[Date Prev] [Date Index] [Date Next]
[Thread Prev] [Thread Index] [Thread Next]

[xyzzy:00161] アウトラインもどき



みなさん、こんにちは。須田です。
[xyzzy:00157] の名誉挽回版です。少し改善されたかも?
まだ穴だらけですが、使えるかもしれません???
どしろうとなのに、おくめんがないのです。お許しを。
---------------------------------------------
(provide "outline")
(in-package "editor")
(export '(outline outline-jump outline-search *outline-buffer*))
(defvar *outline-buffer* "")

(defun outline ()
  (interactive)
  (let* ((buffer (selected-buffer))
  (*outline-buffer* (concat "Outline-" (buffer-name buffer))))
    (get-buffer-create *outline-buffer*)
    (set-buffer buffer)
    (with-output-to-buffer (*outline-buffer*)
      (save-excursion
 (goto-char (point-min))
 (while (scan-buffer "^[■◆◇●○・]"
       :regexp t)
   (format t "~A~%"
    (buffer-substring (progn
          (goto-bol)
          (point))
        (progn
          (goto-eol)
          (point))))
   (or (forward-char 1)
       (return)))))
    (message "completed.")
    (split-window-vertically -90)
    (other-window -1)
    (set-buffer *outline-buffer*)))

(defun outline-jump ()
  (interactive)
  (let ((string (save-excursion
    (buffer-substring
     (progn
       (goto-bol)
       (point))
     (progn
       (goto-eol)
       (point))))))
    (other-window)
    (goto-char (point-min))
    (outline-search string)))

(defun outline-search (pattern &optional noerror)
  (interactive "*p")
  (search-command pattern nil nil (interactive-p) noerror))

(global-set-key #\F12 'outline-jump)
(global-set-key #\C-F12 'outline)

--------------------------

suda seiya
EZU11330@xxxxxxxxxxxxxxxx

Index Home