aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2022-06-20 13:23:24 +0200
committerStefan Kangas2022-06-20 13:23:24 +0200
commite2ec4b844337794a4b95475481fecdd7a5ad28e9 (patch)
treeeff47e86f213f764040756f4ca7b852e2db435b4
parent45dc99dcb91f0de5b9ea30141e1dd5a53368e38b (diff)
downloademacs-e2ec4b844337794a4b95475481fecdd7a5ad28e9.tar.gz
emacs-e2ec4b844337794a4b95475481fecdd7a5ad28e9.zip
Prefer defvar-keymap in hi-lock.el
* lisp/hi-lock.el: Prefer keymap-set in documentation. (hi-lock-map): Prefer defvar-keymap.
-rw-r--r--lisp/hi-lock.el33
1 files changed, 16 insertions, 17 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 0934eef8ed7..8cddd644824 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -69,12 +69,12 @@
69;; You might also want to bind the hi-lock commands to more 69;; You might also want to bind the hi-lock commands to more
70;; finger-friendly sequences: 70;; finger-friendly sequences:
71 71
72;; (define-key hi-lock-map "\C-z\C-h" 'highlight-lines-matching-regexp) 72;; (keymap-set hi-lock-map "C-z C-h" 'highlight-lines-matching-regexp)
73;; (define-key hi-lock-map "\C-zi" 'hi-lock-find-patterns) 73;; (keymap-set hi-lock-map "C-z i" 'hi-lock-find-patterns)
74;; (define-key hi-lock-map "\C-zh" 'highlight-regexp) 74;; (keymap-set hi-lock-map "C-z h" 'highlight-regexp)
75;; (define-key hi-lock-map "\C-zp" 'highlight-phrase) 75;; (keymap-set hi-lock-map "C-z p" 'highlight-phrase)
76;; (define-key hi-lock-map "\C-zr" 'unhighlight-regexp) 76;; (keymap-set hi-lock-map "C-z r" 'unhighlight-regexp)
77;; (define-key hi-lock-map "\C-zb" 'hi-lock-write-interactive-patterns)) 77;; (keymap-set hi-lock-map "C-z b" 'hi-lock-write-interactive-patterns))
78 78
79;; See the documentation for hi-lock-mode `C-h f hi-lock-mode' for 79;; See the documentation for hi-lock-mode `C-h f hi-lock-mode' for
80;; additional instructions. 80;; additional instructions.
@@ -276,17 +276,16 @@ a library is being loaded.")
276 ["Patterns from Buffer" hi-lock-find-patterns 276 ["Patterns from Buffer" hi-lock-find-patterns
277 :help "Use patterns (if any) near top of buffer."])) 277 :help "Use patterns (if any) near top of buffer."]))
278 278
279(defvar hi-lock-map 279(defvar-keymap hi-lock-map
280 (let ((map (make-sparse-keymap "Hi Lock"))) 280 :doc "Keymap for `hi-lock-mode'."
281 (define-key map "\C-xwi" 'hi-lock-find-patterns) 281 :name "Hi Lock"
282 (define-key map "\C-xwl" 'highlight-lines-matching-regexp) 282 "C-x w i" #'hi-lock-find-patterns
283 (define-key map "\C-xwp" 'highlight-phrase) 283 "C-x w l" #'highlight-lines-matching-regexp
284 (define-key map "\C-xwh" 'highlight-regexp) 284 "C-x w p" #'highlight-phrase
285 (define-key map "\C-xw." 'highlight-symbol-at-point) 285 "C-x w h" #'highlight-regexp
286 (define-key map "\C-xwr" 'unhighlight-regexp) 286 "C-x w ." #'highlight-symbol-at-point
287 (define-key map "\C-xwb" 'hi-lock-write-interactive-patterns) 287 "C-x w r" #'unhighlight-regexp
288 map) 288 "C-x w b" #'hi-lock-write-interactive-patterns)
289 "Key map for hi-lock.")
290 289
291;; Visible Functions 290;; Visible Functions
292 291