From: Stefan Kangas Date: Sat, 20 Feb 2021 05:59:02 +0000 (+0100) Subject: Convert finder menu to easy-menu-define X-Git-Tag: emacs-28.0.90~3639 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7b12747e2f2136bc76bfbeb3648131281ec14961;p=emacs.git 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. --- 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)