diff options
author | Stefan Kangas <stefan@marxist.se> | 2021-02-20 06:59:02 +0100 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2021-02-20 07:55:04 +0100 |
commit | 7b12747e2f2136bc76bfbeb3648131281ec14961 (patch) | |
tree | 85904a4e96e770fd55405ebee2b1c97112466691 /lisp/finder.el | |
parent | c85c8e7d42ae2a5fc95fa7b14257389d8383b34d (diff) | |
download | emacs-7b12747e2f2136bc76bfbeb3648131281ec14961.tar.gz emacs-7b12747e2f2136bc76bfbeb3648131281ec14961.tar.bz2 emacs-7b12747e2f2136bc76bfbeb3648131281ec14961.zip |
Convert finder menu to easy-menu-define
* lisp/finder.el (finder-mode-map): Move menu definition from
here...
(finder-mode-menu): ...to here, and rewrite using
easy-menu-define.
Diffstat (limited to 'lisp/finder.el')
-rw-r--r-- | lisp/finder.el | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/finder.el b/lisp/finder.el index 15c3fcbac79..2c3869b5089 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -90,24 +90,21 @@ Each element has the form (KEYWORD . DESCRIPTION).") (define-key map "p" 'previous-line) (define-key map "q" 'finder-exit) (define-key map "d" 'finder-list-keywords) - - (define-key map [menu-bar finder-mode] - (cons "Finder" menu-map)) - (define-key menu-map [finder-exit] - '(menu-item "Quit" finder-exit - :help "Exit Finder mode")) - (define-key menu-map [finder-summary] - '(menu-item "Summary" finder-summary - :help "Summary item on current line in a finder buffer")) - (define-key menu-map [finder-list-keywords] - '(menu-item "List keywords" finder-list-keywords - :help "Display descriptions of the keywords in the Finder buffer")) - (define-key menu-map [finder-select] - '(menu-item "Select" finder-select - :help "Select item on current line in a finder buffer")) map) "Keymap used in `finder-mode'.") +(easy-menu-define finder-mode-menu finder-mode-map + "Menu for `finder-mode'." + '("Finder" + ["Select" finder-select + :help "Select item on current line in a finder buffer"] + ["List keywords" finder-list-keywords + :help "Display descriptions of the keywords in the Finder buffer"] + ["Summary" finder-summary + :help "Summary item on current line in a finder buffer"] + ["Quit" finder-exit + :help "Exit Finder mode"])) + (defvar finder-mode-syntax-table (let ((st (make-syntax-table emacs-lisp-mode-syntax-table))) (modify-syntax-entry ?\; ". " st) |