diff options
author | Juri Linkov <juri@linkov.net> | 2021-09-15 19:00:56 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2021-09-15 19:00:56 +0300 |
commit | 231a29f36333d10b7122bb9e25da4db8cb03b73d (patch) | |
tree | 8eeeb0a5d33496fa24c616f545b2dbea4ce7411a /lisp/replace.el | |
parent | 7a69fe3bc993f2599dacf653b43e4cba72456ac1 (diff) | |
download | emacs-231a29f36333d10b7122bb9e25da4db8cb03b73d.tar.gz |
Add docstrings to context menu functions, and add middle-separator
* lisp/mouse.el (context-menu-functions): Add context-menu-middle-separator
to default values.
(context-menu-middle-separator): New function.
* lisp/replace.el (occur-context-menu): Use middle-separator.
* lisp/progmodes/elisp-mode.el (elisp-context-menu):
* lisp/progmodes/prog-mode.el (prog-context-menu):
Use middle-separator and reorder menu items correspondingly.
Diffstat (limited to 'lisp/replace.el')
-rw-r--r-- | lisp/replace.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index 63b58c9b454..947da8a2feb 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -2380,13 +2380,13 @@ See also `multi-occur'." (occur (concat "\\_<" (regexp-quote symbol) "\\_>")))) (defun occur-context-menu (menu click) - "Populate MENU with occur commands for CLICK. + "Populate MENU with occur commands at CLICK. To be added to `context-menu-functions'." (let ((word (thing-at-mouse click 'word)) (sym (thing-at-mouse click 'symbol))) (when (or word sym) (define-key-after menu [occur-separator] menu-bar-separator - 'mark-whole-buffer) + 'middle-separator) (when sym (define-key-after menu [occur-symbol-at-mouse] '(menu-item "Occur Symbol" occur-symbol-at-mouse) |