mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
(finder-mode): Don't switch buffers or change text here.
(finder-by-keyword): Don't call finder-mode here. (finder-list-matches): Call finder-mode here. Switch to a buffer called *Finder Category*. (finder-list-keywords): Call finder-mode here. Switch to the buffer *Finder*. If the buffer already exists, don't reinitialize it or move point.
This commit is contained in:
parent
04bed6f76c
commit
5acc847d85
@ -172,23 +172,29 @@ arguments compiles from `load-path'."
|
||||
(defun finder-list-keywords ()
|
||||
"Display descriptions of the keywords in the Finder buffer."
|
||||
(interactive)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(mapcar
|
||||
(lambda (assoc)
|
||||
(let ((keyword (car assoc)))
|
||||
(insert (symbol-name keyword))
|
||||
(finder-insert-at-column 14 (concat (cdr assoc) "\n"))
|
||||
(cons (symbol-name keyword) keyword)))
|
||||
finder-known-keywords)
|
||||
(goto-char (point-min))
|
||||
(setq finder-headmark (point))
|
||||
(setq buffer-read-only t)
|
||||
(set-buffer-modified-p nil)
|
||||
(balance-windows)
|
||||
(finder-summary))
|
||||
(if (get-buffer "*Finder*")
|
||||
(pop-to-buffer "*Finder*")
|
||||
(pop-to-buffer (set-buffer "*Finder*"))
|
||||
(finder-mode)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(mapcar
|
||||
(lambda (assoc)
|
||||
(let ((keyword (car assoc)))
|
||||
(insert (symbol-name keyword))
|
||||
(finder-insert-at-column 14 (concat (cdr assoc) "\n"))
|
||||
(cons (symbol-name keyword) keyword)))
|
||||
finder-known-keywords)
|
||||
(goto-char (point-min))
|
||||
(setq finder-headmark (point))
|
||||
(setq buffer-read-only t)
|
||||
(set-buffer-modified-p nil)
|
||||
(balance-windows)
|
||||
(finder-summary)))
|
||||
|
||||
(defun finder-list-matches (key)
|
||||
(pop-to-buffer (set-buffer "*Finder Category*"))
|
||||
(finder-mode)
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(let ((id (intern key)))
|
||||
@ -262,7 +268,6 @@ arguments compiles from `load-path'."
|
||||
(defun finder-by-keyword ()
|
||||
"Find packages matching a given keyword."
|
||||
(interactive)
|
||||
(finder-mode)
|
||||
(finder-list-keywords))
|
||||
|
||||
(defun finder-mode ()
|
||||
@ -272,9 +277,6 @@ arguments compiles from `load-path'."
|
||||
\\[finder-exit] exit Finder mode and kill the Finder buffer.
|
||||
"
|
||||
(interactive)
|
||||
(pop-to-buffer "*Finder*")
|
||||
(setq buffer-read-only nil)
|
||||
(erase-buffer)
|
||||
(use-local-map finder-mode-map)
|
||||
(set-syntax-table emacs-lisp-mode-syntax-table)
|
||||
(setq mode-name "Finder")
|
||||
|
Loading…
Reference in New Issue
Block a user