aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kangas2021-02-28 22:21:39 +0100
committerStefan Kangas2021-02-28 22:21:55 +0100
commitc8f19a4af6d90a2d7e580a4621dabc8deffeacd0 (patch)
treeac7d6c6da7adf233da9c77275057615e20c7d443
parent56a85590766ec8592100db38937d10b096e9ce30 (diff)
downloademacs-c8f19a4af6d90a2d7e580a4621dabc8deffeacd0.tar.gz
emacs-c8f19a4af6d90a2d7e580a4621dabc8deffeacd0.zip
Convert hi-lock-menu to easymenu
* lisp/hi-lock.el (hi-lock-menu): Convert to easymenu.
-rw-r--r--lisp/hi-lock.el52
1 files changed, 19 insertions, 33 deletions
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el
index 0ad499b4dbf..68f8cc50549 100644
--- a/lisp/hi-lock.el
+++ b/lisp/hi-lock.el
@@ -254,39 +254,25 @@ that older functionality. This variable avoids multiple reminders.")
254Assumption is made if `hi-lock-mode' used in the *scratch* buffer while 254Assumption is made if `hi-lock-mode' used in the *scratch* buffer while
255a library is being loaded.") 255a library is being loaded.")
256 256
257(defvar hi-lock-menu 257(easy-menu-define hi-lock-menu nil
258 (let ((map (make-sparse-keymap "Hi Lock"))) 258 "Menu for hi-lock mode."
259 (define-key-after map [highlight-regexp] 259 '("Hi Lock"
260 '(menu-item "Highlight Regexp..." highlight-regexp 260 ["Highlight Regexp..." highlight-regexp
261 :help "Highlight text matching PATTERN (a regexp).")) 261 :help "Highlight text matching PATTERN (a regexp)."]
262 262 ["Highlight Phrase..." highlight-phrase
263 (define-key-after map [highlight-phrase] 263 :help "Highlight text matching PATTERN (a regexp processed to match phrases)."]
264 '(menu-item "Highlight Phrase..." highlight-phrase 264 ["Highlight Lines..." highlight-lines-matching-regexp
265 :help "Highlight text matching PATTERN (a regexp processed to match phrases).")) 265 :help "Highlight lines containing match of PATTERN (a regexp)."]
266 266 ["Highlight Symbol at Point" highlight-symbol-at-point
267 (define-key-after map [highlight-lines-matching-regexp] 267 :help "Highlight symbol found near point without prompting."]
268 '(menu-item "Highlight Lines..." highlight-lines-matching-regexp 268 ["Remove Highlighting..." unhighlight-regexp
269 :help "Highlight lines containing match of PATTERN (a regexp).")) 269 :help "Remove previously entered highlighting pattern."
270 270 :enable hi-lock-interactive-patterns]
271 (define-key-after map [highlight-symbol-at-point] 271 ["Patterns to Buffer" hi-lock-write-interactive-patterns
272 '(menu-item "Highlight Symbol at Point" highlight-symbol-at-point 272 :help "Insert interactively added REGEXPs into buffer at point."
273 :help "Highlight symbol found near point without prompting.")) 273 :enable hi-lock-interactive-patterns]
274 274 ["Patterns from Buffer" hi-lock-find-patterns
275 (define-key-after map [unhighlight-regexp] 275 :help "Use patterns (if any) near top of buffer."]))
276 '(menu-item "Remove Highlighting..." unhighlight-regexp
277 :help "Remove previously entered highlighting pattern."
278 :enable hi-lock-interactive-patterns))
279
280 (define-key-after map [hi-lock-write-interactive-patterns]
281 '(menu-item "Patterns to Buffer" hi-lock-write-interactive-patterns
282 :help "Insert interactively added REGEXPs into buffer at point."
283 :enable hi-lock-interactive-patterns))
284
285 (define-key-after map [hi-lock-find-patterns]
286 '(menu-item "Patterns from Buffer" hi-lock-find-patterns
287 :help "Use patterns (if any) near top of buffer."))
288 map)
289 "Menu for hi-lock mode.")
290 276
291(defvar hi-lock-map 277(defvar hi-lock-map
292 (let ((map (make-sparse-keymap "Hi Lock"))) 278 (let ((map (make-sparse-keymap "Hi Lock")))