summaryrefslogtreecommitdiff
path: root/lisp/finder.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/finder.el')
-rw-r--r--lisp/finder.el29
1 files changed, 14 insertions, 15 deletions
diff --git a/lisp/finder.el b/lisp/finder.el
index 2c3869b5089..343739f9036 100644
--- a/lisp/finder.el
+++ b/lisp/finder.el
@@ -1,11 +1,10 @@
-;;; finder.el --- topic & keyword-based code finder
+;;; finder.el --- topic & keyword-based code finder -*- lexical-binding: t -*-
;; Copyright (C) 1992, 1997-1999, 2001-2021 Free Software Foundation,
;; Inc.
;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
;; Created: 16 Jun 1992
-;; Version: 1.0
;; Keywords: help
;; This file is part of GNU Emacs.
@@ -78,8 +77,7 @@
Each element has the form (KEYWORD . DESCRIPTION).")
(defvar finder-mode-map
- (let ((map (make-sparse-keymap))
- (menu-map (make-sparse-keymap "Finder")))
+ (let ((map (make-sparse-keymap)))
(define-key map " " 'finder-select)
(define-key map "f" 'finder-select)
(define-key map [follow-link] 'mouse-face)
@@ -199,8 +197,7 @@ from; the default is `load-path'."
(progress (make-progress-reporter
(byte-compile-info "Scanning files for finder")
0 (length files)))
- package-override base-name ; processed
- summary keywords package version entry desc)
+ base-name summary keywords package version entry desc)
(dolist (elem files)
(let* ((d (car elem))
(f (cdr elem))
@@ -230,7 +227,7 @@ from; the default is `load-path'."
;; (push base-name processed)
(with-temp-buffer
(insert-file-contents (expand-file-name f d))
- (setq keywords (mapcar 'intern (lm-keywords-list))
+ (setq keywords (mapcar #'intern (lm-keywords-list))
package (or package-override
(let ((str (lm-header "package")))
(if str (intern str)))
@@ -290,7 +287,7 @@ from; the default is `load-path'."
(defun finder-compile-keywords-make-dist ()
"Regenerate `finder-inf.el' for the Emacs distribution."
- (apply 'finder-compile-keywords command-line-args-left)
+ (apply #'finder-compile-keywords command-line-args-left)
(kill-emacs))
;;; Now the retrieval code
@@ -299,7 +296,7 @@ from; the default is `load-path'."
"Insert, at column COLUMN, other args STRINGS."
(if (>= (current-column) column) (insert "\n"))
(move-to-column column t)
- (apply 'insert strings))
+ (apply #'insert strings))
(defvar finder-help-echo nil)
@@ -316,7 +313,7 @@ from; the default is `load-path'."
(keys (nconc (where-is-internal
'finder-mouse-select finder-mode-map)
keys1)))
- (concat (mapconcat 'key-description keys ", ")
+ (concat (mapconcat #'key-description keys ", ")
": select item"))))
(add-text-properties
(line-beginning-position) (line-end-position)
@@ -368,7 +365,7 @@ not `finder-known-keywords'."
(define-button-type 'finder-xref 'action #'finder-goto-xref)
(defun finder-goto-xref (button)
- "Jump to a lisp file for the BUTTON at point."
+ "Jump to a Lisp file for the BUTTON at point."
(let* ((file (button-get button 'xref))
(lib (locate-library file)))
(if lib (finder-commentary lib)
@@ -418,7 +415,7 @@ FILE should be in a form suitable for passing to `locate-library'."
(defun finder-select ()
"Select item on current line in a Finder buffer."
- (interactive)
+ (interactive nil finder-mode)
(let ((key (finder-current-item)))
(if (string-match "\\.el$" key)
(finder-commentary key)
@@ -426,7 +423,7 @@ FILE should be in a form suitable for passing to `locate-library'."
(defun finder-mouse-select (event)
"Select item in a Finder buffer with the mouse."
- (interactive "e")
+ (interactive "e" finder-mode)
(with-current-buffer (window-buffer (posn-window (event-start event)))
(goto-char (posn-point (event-start event)))
(finder-select)))
@@ -434,6 +431,7 @@ FILE should be in a form suitable for passing to `locate-library'."
;;;###autoload
(defun finder-by-keyword ()
"Find packages matching a given keyword."
+ ;; FIXME: Why does this function exist? Should it just be an alias?
(interactive)
(finder-list-keywords))
@@ -443,13 +441,14 @@ FILE should be in a form suitable for passing to `locate-library'."
\\[finder-select] more help for the item on the current line
\\[finder-exit] exit Finder mode and kill the Finder buffer."
:syntax-table finder-mode-syntax-table
+ :interactive nil
(setq buffer-read-only t
buffer-undo-list t)
(setq-local finder-headmark nil))
(defun finder-summary ()
"Summarize basic Finder commands."
- (interactive)
+ (interactive nil finder-mode)
(message "%s"
(substitute-command-keys
"\\<finder-mode-map>\\[finder-select] = select, \
@@ -459,7 +458,7 @@ finder directory, \\[finder-exit] = quit, \\[finder-summary] = help")))
(defun finder-exit ()
"Exit Finder mode.
Quit the window and kill all Finder-related buffers."
- (interactive)
+ (interactive nil finder-mode)
(quit-window t)
(dolist (buf (list finder-buffer "*Finder-package*"))
(and (get-buffer buf) (kill-buffer buf))))