diff options
author | Stefan Kangas <stefan@marxist.se> | 2022-07-04 18:42:26 +0200 |
---|---|---|
committer | Stefan Kangas <stefan@marxist.se> | 2022-07-04 22:15:51 +0200 |
commit | 162c6c12f97db9b4b3042dc8d122027e9fb01e71 (patch) | |
tree | 6bb4d0efddb0d39bb64e210b4f57dea9b0a6469c /lisp/emacs-lisp/lisp-mode.el | |
parent | 616d3c24e2b75c240065abeb524b3c6613b9bb84 (diff) | |
download | emacs-162c6c12f97db9b4b3042dc8d122027e9fb01e71.tar.gz |
Prefer defvar-keymap in emacs-lisp/*.el
* lisp/emacs-lisp/backtrace.el (backtrace-mode-map):
* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode-map):
* lisp/emacs-lisp/checkdoc.el (checkdoc-minor-mode-map):
* lisp/emacs-lisp/crm.el (crm-local-completion-map)
(crm-local-must-match-map):
* lisp/emacs-lisp/debug.el (debugger-mode-map):
* lisp/emacs-lisp/edebug.el (edebug-mode-map, edebug-global-map)
(edebug-eval-mode-map):
* lisp/emacs-lisp/eieio-custom.el (eieio-custom-mode-map):
* lisp/emacs-lisp/elp.el (elp-results-symname-map):
* lisp/emacs-lisp/lisp-mode.el (lisp-mode-shared-map):
* lisp/emacs-lisp/re-builder.el (reb-mode-map)
(reb-lisp-mode-map, reb-subexp-mode-map):
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode-map)
(tabulated-list-sort-button-map):
* lisp/emacs-lisp/timer-list.el (timer-list-mode-map):
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 65f76a4fa35..c559dd427cb 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -753,17 +753,16 @@ font-lock keywords will not be case sensitive." (progn (forward-sexp 1) (point))))))) -(defvar lisp-mode-shared-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map prog-mode-map) - (define-key map "\e\C-q" 'indent-sexp) - (define-key map "\177" 'backward-delete-char-untabify) - ;; This gets in the way when viewing a Lisp file in view-mode. As - ;; long as [backspace] is mapped into DEL via the - ;; function-key-map, this should remain disabled!! - ;;;(define-key map [backspace] 'backward-delete-char-untabify) - map) - "Keymap for commands shared by all sorts of Lisp modes.") +(defvar-keymap lisp-mode-shared-map + :doc "Keymap for commands shared by all sorts of Lisp modes." + :parent prog-mode-map + "C-M-q" #'indent-sexp + "DEL" #'backward-delete-char-untabify + ;; This gets in the way when viewing a Lisp file in view-mode. As + ;; long as [backspace] is mapped into DEL via the + ;; function-key-map, this should remain disabled!! + ;;;"<backspace>" #'backward-delete-char-untabify + ) (defcustom lisp-mode-hook nil "Hook run when entering Lisp mode." @@ -779,14 +778,12 @@ font-lock keywords will not be case sensitive." ;;; Generic Lisp mode. -(defvar lisp-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map lisp-mode-shared-map) - (define-key map "\e\C-x" 'lisp-eval-defun) - (define-key map "\C-c\C-z" 'run-lisp) - map) - "Keymap for ordinary Lisp mode. -All commands in `lisp-mode-shared-map' are inherited by this map.") +(defvar-keymap lisp-mode-map + :doc "Keymap for ordinary Lisp mode. +All commands in `lisp-mode-shared-map' are inherited by this map." + :parent lisp-mode-shared-map + "C-M-x" #'lisp-eval-defun + "C-c C-z" #'run-lisp) (easy-menu-define lisp-mode-menu lisp-mode-map "Menu for ordinary Lisp mode." |