diff options
author | Stefan Kangas <stefankangas@gmail.com> | 2022-09-13 15:05:28 +0200 |
---|---|---|
committer | Stefan Kangas <stefankangas@gmail.com> | 2022-09-13 15:05:38 +0200 |
commit | aac4965702d3d8c665e13e8c8c7f6fb229b05097 (patch) | |
tree | af8ce215a68d6aab37a9bc8eba9f3bc5a82b0960 /lisp/gnus | |
parent | 280b40cd8a46b325768f757ae9b50064524a46e1 (diff) | |
download | emacs-aac4965702d3d8c665e13e8c8c7f6fb229b05097.tar.gz emacs-aac4965702d3d8c665e13e8c8c7f6fb229b05097.tar.bz2 emacs-aac4965702d3d8c665e13e8c8c7f6fb229b05097.zip |
Prefer defvar-keymap in several cases
* lisp/calc/calc-embed.el (calc-override-minor-modes-map):
* lisp/calc/calc-yank.el (calc-edit-mode-map):
* lisp/calc/calc.el (calc-trail-mode-map):
* lisp/cedet/semantic/mru-bookmark.el (semantic-mru-bookmark-mode-map):
* lisp/cedet/semantic/util-modes.el (semantic-highlight-edits-mode-map)
(semantic-show-unmatched-syntax-mode-map)
(semantic-show-parser-state-mode-map)
(semantic-stickyfunc-mode-map, semantic-highlight-func-mode-map):
* lisp/cedet/srecode/srt-mode.el (srecode-template-mode-map):
* lisp/gnus/gnus-art.el (gnus-prev-page-map, gnus-next-page-map):
* lisp/gnus/gnus-search.el (gnus-search-minibuffer-map):
* lisp/gnus/score-mode.el (gnus-score-mode-map):
* lisp/gnus/smime.el (smime-mode-map):
* lisp/indent.el (edit-tab-stops-map):
* lisp/isearch.el (minibuffer-local-isearch-map):
* lisp/printing.el (pr-interface-map):
* lisp/progmodes/prog-mode.el (prog-mode-map):
* lisp/progmodes/subword.el (subword-mode-map):
* lisp/reveal.el (reveal-mode-map):
* lisp/strokes.el (strokes-mode-map):
* lisp/textmodes/flyspell.el (flyspell-mouse-map):
* lisp/textmodes/less-css-mode.el (less-css-mode-map):
* lisp/textmodes/remember.el (remember-mode-map)
(remember-notes-mode-map):
* lisp/wid-browse.el (widget-browse-mode-map):
* lisp/wid-edit.el (widget-key-sequence-map): Prefer defvar-keymap in
some easy-to-convert cases.
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/gnus-art.el | 16 | ||||
-rw-r--r-- | lisp/gnus/gnus-search.el | 8 | ||||
-rw-r--r-- | lisp/gnus/score-mode.el | 12 | ||||
-rw-r--r-- | lisp/gnus/smime.el | 10 |
4 files changed, 18 insertions, 28 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 83ba72c091f..fbcf8013138 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -8550,17 +8550,13 @@ url is put as the `gnus-button-url' overlay property on the button." (defvar gnus-next-page-line-format "%{%(Next page...%)%}\n") (defvar gnus-prev-page-line-format "%{%(Previous page...%)%}\n") -(defvar gnus-prev-page-map - (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] #'gnus-button-prev-page) - (define-key map "\r" #'gnus-button-prev-page) - map)) +(defvar-keymap gnus-prev-page-map + "<mouse-2>" #'gnus-button-prev-page + "RET" #'gnus-button-prev-page) -(defvar gnus-next-page-map - (let ((map (make-sparse-keymap))) - (define-key map [mouse-2] #'gnus-button-next-page) - (define-key map "\r" #'gnus-button-next-page) - map)) +(defvar-keymap gnus-next-page-map + "<mouse-2>" #'gnus-button-next-page + "RET" #'gnus-button-next-page) (defun gnus-insert-prev-page-button () (let ((b (point)) e diff --git a/lisp/gnus/gnus-search.el b/lisp/gnus/gnus-search.el index 327dba95c07..b8f7e7a08f0 100644 --- a/lisp/gnus/gnus-search.el +++ b/lisp/gnus/gnus-search.el @@ -2247,11 +2247,9 @@ article came from is also searched." (forward-line))))) groups)) -(defvar gnus-search-minibuffer-map - (let ((km (make-sparse-keymap))) - (set-keymap-parent km minibuffer-local-map) - (define-key km (kbd "TAB") #'completion-at-point) - km)) +(defvar-keymap gnus-search-minibuffer-map + :parent minibuffer-local-map + "TAB" #'completion-at-point) (defun gnus-search--complete-key-data () "Potentially return completion data for a search key or value." diff --git a/lisp/gnus/score-mode.el b/lisp/gnus/score-mode.el index 8e27e879392..4c9d73a6e5e 100644 --- a/lisp/gnus/score-mode.el +++ b/lisp/gnus/score-mode.el @@ -45,13 +45,11 @@ (defvar gnus-score-edit-exit-function nil "Function run on exit from the score buffer.") -(defvar gnus-score-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map emacs-lisp-mode-map) - (define-key map "\C-c\C-c" 'gnus-score-edit-exit) - (define-key map "\C-c\C-d" 'gnus-score-edit-insert-date) - (define-key map "\C-c\C-p" 'gnus-score-pretty-print) - map)) +(defvar-keymap gnus-score-mode-map + :parent emacs-lisp-mode-map + "C-c C-c" #'gnus-score-edit-exit + "C-c C-d" #'gnus-score-edit-insert-date + "C-c C-p" #'gnus-score-pretty-print) (defvar score-mode-syntax-table (let ((table (copy-syntax-table lisp-mode-syntax-table))) diff --git a/lisp/gnus/smime.el b/lisp/gnus/smime.el index fd2791f5c51..7bb116d0c54 100644 --- a/lisp/gnus/smime.el +++ b/lisp/gnus/smime.el @@ -614,12 +614,10 @@ A string or a list of strings is returned." (defvar smime-buffer "*SMIME*") -(defvar smime-mode-map - (let ((map (make-sparse-keymap))) - (suppress-keymap map) - (define-key map "q" 'smime-exit) - (define-key map "f" 'smime-certificate-info) - map)) +(defvar-keymap smime-mode-map + :suppress t + "q" #'smime-exit + "f" #'smime-certificate-info) (autoload 'gnus-completing-read "gnus-util") |