diff options
author | Juri Linkov <juri@linkov.net> | 2022-09-13 21:17:55 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2022-09-13 21:17:55 +0300 |
commit | fd1ee0597708fbd6926b93e1c13830883d3c1687 (patch) | |
tree | 914540b4814c9ec5358105f6c6dc8401ed63b991 /lisp/outline.el | |
parent | 49419912f20b3cf0131a40798b162cbb596d368e (diff) | |
download | emacs-fd1ee0597708fbd6926b93e1c13830883d3c1687.tar.gz emacs-fd1ee0597708fbd6926b93e1c13830883d3c1687.tar.bz2 emacs-fd1ee0597708fbd6926b93e1c13830883d3c1687.zip |
Prefer defvar-keymap for repeat-map in outline.el
* lisp/outline.el (outline-navigation-repeat-map)
(outline-editing-repeat-map): Prefer defvar-keymap.
Diffstat (limited to 'lisp/outline.el')
-rw-r--r-- | lisp/outline.el | 46 |
1 files changed, 22 insertions, 24 deletions
diff --git a/lisp/outline.el b/lisp/outline.el index 6579e12bfed..b19e0cf8119 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1627,19 +1627,18 @@ With a prefix argument, show headings up to that LEVEL." (message "Show all"))) (outline--fix-up-all-buttons))) -(defvar outline-navigation-repeat-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-b") #'outline-backward-same-level) - (define-key map (kbd "b") #'outline-backward-same-level) - (define-key map (kbd "C-f") #'outline-forward-same-level) - (define-key map (kbd "f") #'outline-forward-same-level) - (define-key map (kbd "C-n") #'outline-next-visible-heading) - (define-key map (kbd "n") #'outline-next-visible-heading) - (define-key map (kbd "C-p") #'outline-previous-visible-heading) - (define-key map (kbd "p") #'outline-previous-visible-heading) - (define-key map (kbd "C-u") #'outline-up-heading) - (define-key map (kbd "u") #'outline-up-heading) - map)) + +(defvar-keymap outline-navigation-repeat-map + "C-b" #'outline-backward-same-level + "b" #'outline-backward-same-level + "C-f" #'outline-forward-same-level + "f" #'outline-forward-same-level + "C-n" #'outline-next-visible-heading + "n" #'outline-next-visible-heading + "C-p" #'outline-previous-visible-heading + "p" #'outline-previous-visible-heading + "C-u" #'outline-up-heading + "u" #'outline-up-heading) (dolist (command '(outline-backward-same-level outline-forward-same-level @@ -1648,17 +1647,15 @@ With a prefix argument, show headings up to that LEVEL." outline-up-heading)) (put command 'repeat-map 'outline-navigation-repeat-map)) -(defvar outline-editing-repeat-map - (let ((map (make-sparse-keymap))) - (define-key map (kbd "C-v") #'outline-move-subtree-down) - (define-key map (kbd "v") #'outline-move-subtree-down) - (define-key map (kbd "C-^") #'outline-move-subtree-up) - (define-key map (kbd "^") #'outline-move-subtree-up) - (define-key map (kbd "C->") #'outline-demote) - (define-key map (kbd ">") #'outline-demote) - (define-key map (kbd "C-<") #'outline-promote) - (define-key map (kbd "<") #'outline-promote) - map)) +(defvar-keymap outline-editing-repeat-map + "C-v" #'outline-move-subtree-down + "v" #'outline-move-subtree-down + "C-^" #'outline-move-subtree-up + "^" #'outline-move-subtree-up + "C->" #'outline-demote + ">" #'outline-demote + "C-<" #'outline-promote + "<" #'outline-promote) (dolist (command '(outline-move-subtree-down outline-move-subtree-up @@ -1666,6 +1663,7 @@ With a prefix argument, show headings up to that LEVEL." outline-promote)) (put command 'repeat-map 'outline-editing-repeat-map)) + (provide 'outline) (provide 'noutline) |