From e5da2c3d61e96fc3d711e777b0c2d3c49346302a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 30 Oct 2022 21:30:41 +0100 Subject: [PATCH] Prefer defvar-keymap in simula.el * lisp/progmodes/simula.el (simula-mode-map): Prefer defvar-keymap. --- lisp/progmodes/simula.el | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index a1794d3f70d..9aa8a994ed5 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -245,20 +245,19 @@ for SIMULA mode to function correctly." (defvar simula-font-lock-keywords simula-font-lock-keywords-1 "Default expressions to highlight in Simula mode.") -(defvar simula-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\C-c\C-u" #'simula-backward-up-level) - (define-key map "\C-c\C-p" #'simula-previous-statement) - (define-key map "\C-c\C-d" #'simula-forward-down-level) - (define-key map "\C-c\C-n" #'simula-next-statement) - ;; (define-key map "\C-c\C-g" #'simula-goto-definition) - ;; (define-key map "\C-c\C-h" #'simula-standard-help) - (define-key map "\177" #'backward-delete-char-untabify) - (define-key map ":" #'simula-electric-label) - (define-key map "\e\C-q" #'simula-indent-exp) - ;; (define-key map "\t" #'simula-indent-command) - map) - "Keymap used in `simula-mode'.") +(defvar-keymap simula-mode-map + :doc "Keymap used in `simula-mode'." + "C-c C-u" #'simula-backward-up-level + "C-c C-p" #'simula-previous-statement + "C-c C-d" #'simula-forward-down-level + "C-c C-n" #'simula-next-statement + ;; "C-c C-g" #'simula-goto-definition + ;; "C-c C-h" #'simula-standard-help + "DEL" #'backward-delete-char-untabify + ":" #'simula-electric-label + "C-M-q" #'simula-indent-exp + ;; "TAB" #'simula-indent-command + ) (easy-menu-define simula-mode-menu simula-mode-map "Menu for `simula-mode'." -- 2.39.2