summaryrefslogtreecommitdiff
path: root/lisp/progmodes/m4-mode.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-02-21 08:24:44 +0100
committerStefan Kangas <stefan@marxist.se>2021-02-21 10:49:07 +0100
commit2c26eb11159b0acc2e3e74f9d1a96e615e86a40b (patch)
tree92a0b6ecdc79f35139dc908aa304be2a340ac38f /lisp/progmodes/m4-mode.el
parent3010794753ddbb652d4362fcdf74aabf424144d1 (diff)
downloademacs-2c26eb11159b0acc2e3e74f9d1a96e615e86a40b.tar.gz
Convert some progmodes menus to easy-menu-define
* lisp/progmodes/asm-mode.el (asm-mode-map): * lisp/progmodes/grep.el (grep-mode-map): * lisp/progmodes/m4-mode.el (m4-mode-map): * lisp/progmodes/sh-script.el (sh-mode-map): Move menu definition from here... * lisp/progmodes/asm-mode.el (asm-mode-menu): * lisp/progmodes/grep.el (grep-menu-map): * lisp/progmodes/m4-mode.el (m4-mode-menu): * lisp/progmodes/sh-script.el (sh-mode-menu): ...to here, and rewrite using easy-menu-define.
Diffstat (limited to 'lisp/progmodes/m4-mode.el')
-rw-r--r--lisp/progmodes/m4-mode.el26
1 files changed, 13 insertions, 13 deletions
diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el
index 7dfaed44282..d9c09f6fe6b 100644
--- a/lisp/progmodes/m4-mode.el
+++ b/lisp/progmodes/m4-mode.el
@@ -122,22 +122,22 @@ If m4 is not in your PATH, set this to an absolute file name."
(string-to-syntax "."))))))
(defvar m4-mode-map
- (let ((map (make-sparse-keymap))
- (menu-map (make-sparse-keymap)))
+ (let ((map (make-sparse-keymap)))
(define-key map "\C-c\C-b" 'm4-m4-buffer)
(define-key map "\C-c\C-r" 'm4-m4-region)
(define-key map "\C-c\C-c" 'comment-region)
- (define-key map [menu-bar m4-mode] (cons "M4" menu-map))
- (define-key menu-map [m4c]
- '(menu-item "Comment Region" comment-region
- :help "Comment Region"))
- (define-key menu-map [m4b]
- '(menu-item "M4 Buffer" m4-m4-buffer
- :help "Send contents of the current buffer to m4"))
- (define-key menu-map [m4r]
- '(menu-item "M4 Region" m4-m4-region
- :help "Send contents of the current region to m4"))
- map))
+ map)
+ "Keymap for M4 Mode.")
+
+(easy-menu-define m4-mode-menu m4-mode-map
+ "Menu for M4 Mode."
+ '("M4"
+ ["M4 Region" m4-m4-region
+ :help "Send contents of the current region to m4"]
+ ["M4 Buffer" m4-m4-buffer
+ :help "Send contents of the current buffer to m4"]
+ ["Comment Region" comment-region
+ :help "Comment Region"]))
(defun m4-m4-buffer ()
"Send contents of the current buffer to m4."