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/checkdoc.el | |
parent | 616d3c24e2b75c240065abeb524b3c6613b9bb84 (diff) | |
download | emacs-162c6c12f97db9b4b3042dc8d122027e9fb01e71.tar.gz emacs-162c6c12f97db9b4b3042dc8d122027e9fb01e71.tar.bz2 emacs-162c6c12f97db9b4b3042dc8d122027e9fb01e71.zip |
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/checkdoc.el')
-rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 56 |
1 files changed, 24 insertions, 32 deletions
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 2c9adfe2d27..611f32e23c6 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -1279,38 +1279,30 @@ TEXT, START, END and UNFIXABLE conform to ;;; Minor Mode specification ;; -(defvar checkdoc-minor-mode-map - (let ((map (make-sparse-keymap)) - (pmap (make-sparse-keymap))) - ;; Override some bindings - (define-key map "\C-\M-x" #'checkdoc-eval-defun) - (define-key map "\C-x`" #'checkdoc-continue) - (define-key map [menu-bar emacs-lisp eval-buffer] - #'checkdoc-eval-current-buffer) - ;; Add some new bindings under C-c ? - (define-key pmap "x" #'checkdoc-defun) - (define-key pmap "X" #'checkdoc-ispell-defun) - (define-key pmap "`" #'checkdoc-continue) - (define-key pmap "~" #'checkdoc-ispell-continue) - (define-key pmap "s" #'checkdoc-start) - (define-key pmap "S" #'checkdoc-ispell-start) - (define-key pmap "d" #'checkdoc) - (define-key pmap "D" #'checkdoc-ispell) - (define-key pmap "b" #'checkdoc-current-buffer) - (define-key pmap "B" #'checkdoc-ispell-current-buffer) - (define-key pmap "e" #'checkdoc-eval-current-buffer) - (define-key pmap "m" #'checkdoc-message-text) - (define-key pmap "M" #'checkdoc-ispell-message-text) - (define-key pmap "c" #'checkdoc-comments) - (define-key pmap "C" #'checkdoc-ispell-comments) - (define-key pmap " " #'checkdoc-rogue-spaces) - - ;; bind our submap into map - (define-key map "\C-c?" pmap) - map) - "Keymap used to override evaluation key-bindings for documentation checking.") - -;; Add in a menubar with easy-menu +(defvar-keymap checkdoc-minor-mode-map + :doc "Keymap used to override evaluation key-bindings for documentation checking." + ;; Override some bindings + "C-M-x" #'checkdoc-eval-defun + "C-x `" #'checkdoc-continue + "<menu-bar> <emacs-lisp> <eval-buffer>" #'checkdoc-eval-current-buffer + + ;; Add some new bindings under C-c ? + "C-c ? x" #'checkdoc-defun + "C-c ? X" #'checkdoc-ispell-defun + "C-c ? `" #'checkdoc-continue + "C-c ? ~" #'checkdoc-ispell-continue + "C-c ? s" #'checkdoc-start + "C-c ? S" #'checkdoc-ispell-start + "C-c ? d" #'checkdoc + "C-c ? D" #'checkdoc-ispell + "C-c ? b" #'checkdoc-current-buffer + "C-c ? B" #'checkdoc-ispell-current-buffer + "C-c ? e" #'checkdoc-eval-current-buffer + "C-c ? m" #'checkdoc-message-text + "C-c ? M" #'checkdoc-ispell-message-text + "C-c ? c" #'checkdoc-comments + "C-c ? C" #'checkdoc-ispell-comments + "C-c ? SPC" #'checkdoc-rogue-spaces) (easy-menu-define nil checkdoc-minor-mode-map "Checkdoc Minor Mode Menu." |