summaryrefslogtreecommitdiff
path: root/lisp/progmodes/dcl-mode.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-02-26 16:23:45 +0100
committerStefan Kangas <stefan@marxist.se>2021-02-26 16:51:19 +0100
commitffdb0a2d8e64980d63b7c1c6c71ac6e2d26b4fb2 (patch)
treed481fdfd4f55ff585c0411f8b6db10b118b1c104 /lisp/progmodes/dcl-mode.el
parent47f2a39f427f2e7bfd3de371316e3a2c47841340 (diff)
downloademacs-ffdb0a2d8e64980d63b7c1c6c71ac6e2d26b4fb2.tar.gz
Convert some more progmode menus to easy-menu-define
* lisp/progmodes/dcl-mode.el (dcl-mode-map): * lisp/progmodes/icon.el (icon-mode-map): * lisp/progmodes/scheme.el (scheme-mode-map): Move menu definitions from here... * lisp/progmodes/dcl-mode.el (dcl-mode-menu): * lisp/progmodes/icon.el (icon-mode-menu) * lisp/progmodes/scheme.el (scheme-mode-menu): ...to here, and use easy-menu-define. * lisp/progmodes/icon.el (icon-mode-map, icon-mode-syntax-table): Simplify.
Diffstat (limited to 'lisp/progmodes/dcl-mode.el')
-rw-r--r--lisp/progmodes/dcl-mode.el61
1 files changed, 21 insertions, 40 deletions
diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el
index 4a8a20a2969..6ffceb444c1 100644
--- a/lisp/progmodes/dcl-mode.el
+++ b/lisp/progmodes/dcl-mode.el
@@ -286,49 +286,30 @@ See `imenu-generic-expression' for details."
(define-key map "\C-c\C-o" 'dcl-set-option)
(define-key map "\C-c\C-f" 'tempo-forward-mark)
(define-key map "\C-c\C-b" 'tempo-backward-mark)
-
- (define-key map [menu-bar] (make-sparse-keymap))
- (define-key map [menu-bar dcl]
- (cons "DCL" (make-sparse-keymap "DCL")))
-
- ;; Define these in bottom-up order
- (define-key map [menu-bar dcl tempo-backward-mark]
- '("Previous template mark" . tempo-backward-mark))
- (define-key map [menu-bar dcl tempo-forward-mark]
- '("Next template mark" . tempo-forward-mark))
- (define-key map [menu-bar dcl tempo-complete-tag]
- '("Complete template tag" . tempo-complete-tag))
- (define-key map [menu-bar dcl dcl-separator-tempo]
- '("--"))
- (define-key map [menu-bar dcl dcl-save-all-options]
- '("Save all options" . dcl-save-all-options))
- (define-key map [menu-bar dcl dcl-save-nondefault-options]
- '("Save changed options" . dcl-save-nondefault-options))
- (define-key map [menu-bar dcl dcl-set-option]
- '("Set option" . dcl-set-option))
- (define-key map [menu-bar dcl dcl-separator-option]
- '("--"))
- (define-key map [menu-bar dcl dcl-delete-indentation]
- '("Delete indentation" . dcl-delete-indentation))
- (define-key map [menu-bar dcl dcl-split-line]
- '("Split line" . dcl-split-line))
- (define-key map [menu-bar dcl dcl-indent-command]
- '("Indent command" . dcl-indent-command))
- (define-key map [menu-bar dcl dcl-tab]
- '("Indent line/insert tab" . dcl-tab))
- (define-key map [menu-bar dcl dcl-back-to-indentation]
- '("Back to indentation" . dcl-back-to-indentation))
- (define-key map [menu-bar dcl dcl-forward-command]
- '("End of statement" . dcl-forward-command))
- (define-key map [menu-bar dcl dcl-backward-command]
- '("Beginning of statement" . dcl-backward-command))
- (define-key map [menu-bar dcl dcl-separator-movement]
- '("--"))
- (define-key map [menu-bar dcl imenu]
- '("Buffer index menu" . imenu))
map)
"Keymap used in DCL-mode buffers.")
+(easy-menu-define dcl-mode-menu dcl-mode-map
+ "Menu for DCL-mode buffers."
+ '("DCL"
+ ["Buffer index menu" imenu]
+ "---"
+ ["Beginning of statement" dcl-backward-command]
+ ["End of statement" dcl-forward-command]
+ ["Back to indentation" dcl-back-to-indentation]
+ ["Indent line/insert tab" dcl-tab]
+ ["Indent command" dcl-indent-command]
+ ["Split line" dcl-split-line]
+ ["Delete indentation" dcl-delete-indentation]
+ "---"
+ ["Set option" dcl-set-option]
+ ["Save changed options" dcl-save-nondefault-options]
+ ["Save all options" dcl-save-all-options]
+ "---"
+ ["Complete template tag" tempo-complete-tag]
+ ["Next template mark" tempo-forward-mark]
+ ["Previous template mark" tempo-backward-mark]))
+
(defcustom dcl-ws-r
"\\([ \t]*-[ \t]*\\(!.*\\)*\n\\)*[ \t]*"
"Regular expression describing white space in a DCL command line.