1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 18:40:39 -08:00

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.
This commit is contained in:
Juri Linkov 2021-09-15 19:00:56 +03:00
parent 7a69fe3bc9
commit 231a29f363
10 changed files with 62 additions and 39 deletions

View file

@ -1376,7 +1376,7 @@ any buffer where (dictionary-tooltip-mode 1) has been called."
(dictionary-search word)))
(defun context-menu-dictionary (menu click)
"Dictionary context menu."
"Populate MENU with dictionary commands at CLICK."
(when (thing-at-mouse click 'word)
(define-key menu [dictionary-separator] menu-bar-separator)
(define-key menu [dictionary-search-word-at-mouse]

View file

@ -1027,6 +1027,7 @@ the like."
map))
(defun eww-context-menu (menu click)
"Populate MENU with eww commands at CLICK."
(define-key menu [eww-separator] menu-bar-separator)
(let ((easy-menu (make-sparse-keymap "Eww")))
(easy-menu-define nil easy-menu nil

View file

@ -125,6 +125,7 @@ will have no effect.")
"Keymap to hold goto-addr's mouse key defs under highlighted URLs.")
(defun goto-address-context-menu (menu click)
"Populate MENU with goto-address commands at CLICK."
(when (mouse-posn-property (event-start click) 'goto-address)
(define-key menu [goto-address-separator] menu-bar-separator)
(define-key menu [goto-address-at-mouse]