summaryrefslogtreecommitdiff
path: root/lisp/hi-lock.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-02-28 22:21:39 +0100
committerStefan Kangas <stefan@marxist.se>2021-02-28 22:21:55 +0100
commitc8f19a4af6d90a2d7e580a4621dabc8deffeacd0 (patch)
treeac7d6c6da7adf233da9c77275057615e20c7d443 /lisp/hi-lock.el
parent56a85590766ec8592100db38937d10b096e9ce30 (diff)
downloademacs-c8f19a4af6d90a2d7e580a4621dabc8deffeacd0.tar.gz
Convert hi-lock-menu to easymenu
* lisp/hi-lock.el (hi-lock-menu): Convert to easymenu.
Diffstat (limited to 'lisp/hi-lock.el')
-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.")
Assumption is made if `hi-lock-mode' used in the *scratch* buffer while
a library is being loaded.")
-(defvar hi-lock-menu
- (let ((map (make-sparse-keymap "Hi Lock")))
- (define-key-after map [highlight-regexp]
- '(menu-item "Highlight Regexp..." highlight-regexp
- :help "Highlight text matching PATTERN (a regexp)."))
-
- (define-key-after map [highlight-phrase]
- '(menu-item "Highlight Phrase..." highlight-phrase
- :help "Highlight text matching PATTERN (a regexp processed to match phrases)."))
-
- (define-key-after map [highlight-lines-matching-regexp]
- '(menu-item "Highlight Lines..." highlight-lines-matching-regexp
- :help "Highlight lines containing match of PATTERN (a regexp)."))
-
- (define-key-after map [highlight-symbol-at-point]
- '(menu-item "Highlight Symbol at Point" highlight-symbol-at-point
- :help "Highlight symbol found near point without prompting."))
-
- (define-key-after map [unhighlight-regexp]
- '(menu-item "Remove Highlighting..." unhighlight-regexp
- :help "Remove previously entered highlighting pattern."
- :enable hi-lock-interactive-patterns))
-
- (define-key-after map [hi-lock-write-interactive-patterns]
- '(menu-item "Patterns to Buffer" hi-lock-write-interactive-patterns
- :help "Insert interactively added REGEXPs into buffer at point."
- :enable hi-lock-interactive-patterns))
-
- (define-key-after map [hi-lock-find-patterns]
- '(menu-item "Patterns from Buffer" hi-lock-find-patterns
- :help "Use patterns (if any) near top of buffer."))
- map)
- "Menu for hi-lock mode.")
+(easy-menu-define hi-lock-menu nil
+ "Menu for hi-lock mode."
+ '("Hi Lock"
+ ["Highlight Regexp..." highlight-regexp
+ :help "Highlight text matching PATTERN (a regexp)."]
+ ["Highlight Phrase..." highlight-phrase
+ :help "Highlight text matching PATTERN (a regexp processed to match phrases)."]
+ ["Highlight Lines..." highlight-lines-matching-regexp
+ :help "Highlight lines containing match of PATTERN (a regexp)."]
+ ["Highlight Symbol at Point" highlight-symbol-at-point
+ :help "Highlight symbol found near point without prompting."]
+ ["Remove Highlighting..." unhighlight-regexp
+ :help "Remove previously entered highlighting pattern."
+ :enable hi-lock-interactive-patterns]
+ ["Patterns to Buffer" hi-lock-write-interactive-patterns
+ :help "Insert interactively added REGEXPs into buffer at point."
+ :enable hi-lock-interactive-patterns]
+ ["Patterns from Buffer" hi-lock-find-patterns
+ :help "Use patterns (if any) near top of buffer."]))
(defvar hi-lock-map
(let ((map (make-sparse-keymap "Hi Lock")))