diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-06-23 12:20:38 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-06-23 12:48:29 +0200 |
commit | 3832e5360bd71c90eb0f7ad88f0daf001de8b3d3 (patch) | |
tree | 805b992d80a6988f384675bcc3682cf5f43327c2 /lisp/recentf.el | |
parent | c753e4cb2a2a5998626d48d85071c047cbab6c54 (diff) | |
download | emacs-3832e5360bd71c90eb0f7ad88f0daf001de8b3d3.tar.gz emacs-3832e5360bd71c90eb0f7ad88f0daf001de8b3d3.tar.bz2 emacs-3832e5360bd71c90eb0f7ad88f0daf001de8b3d3.zip |
Prefer defvar-keymap and keymap-set in recentf.el
* lisp/recentf.el (recentf-mode-map): Prefer defvar-keymap.
(recentf--shortcuts-keymap): Prefer keymap-set.
Diffstat (limited to 'lisp/recentf.el')
-rw-r--r-- | lisp/recentf.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/recentf.el b/lisp/recentf.el index 6729ede1673..b31aafc9dc9 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -160,7 +160,7 @@ If nil add it at end of menu (see also `easy-menu-add-item')." (const :tag "Last" nil)) :set 'recentf-menu-customization-changed) -(defcustom recentf-menu-action 'find-file +(defcustom recentf-menu-action #'find-file "Function to invoke with a filename item of the recentf menu. The default is to call `find-file' to edit the selected file." :group 'recentf @@ -481,7 +481,7 @@ See also the command `recentf-open-most-recent-file'." (interactive) (recentf-open-most-recent-file ,k))) ;; Bind it to a digit key. - (define-key km (vector (+ k ?0)) cmd))) + (keymap-set km (format "%d" k) cmd))) km) "Digit shortcuts keymap.") @@ -1337,8 +1337,8 @@ That is, remove duplicates, non-kept, and excluded files." ;;; The minor mode ;; -(defvar recentf-mode-map (make-sparse-keymap) - "Keymap to use in recentf mode.") +(defvar-keymap recentf-mode-map + :doc "Keymap to use in `recentf-mode'.") ;;;###autoload (define-minor-mode recentf-mode |