From 373618d3a8ea378710989032c575b3e0c80381b2 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 14 Jan 2022 09:49:44 +0100 Subject: [PATCH] Add new context menu functions to the context-menu-functions type * lisp/mouse.el (context-menu-functions): Add new menu functions to the defcustom type list (bug#52973). --- lisp/hi-lock.el | 1 + lisp/man.el | 1 + lisp/mouse.el | 3 +++ 3 files changed, 5 insertions(+) diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index d7d98c78f86..b70d4a75690 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el @@ -862,6 +862,7 @@ SPACES-REGEXP is a regexp to substitute spaces in font-lock search." (mouse-set-point event) (highlight-symbol-at-point))) +;;;###autoload (defun hi-lock-context-menu (menu click) "Populate MENU with a menu item to highlight symbol at CLICK." (save-excursion diff --git a/lisp/man.el b/lisp/man.el index d94cbf20153..d6146a2c4dc 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -1984,6 +1984,7 @@ Uses `Man-name-local-regexp'." (mouse-set-point e) (man (Man-default-man-entry)))) +;;;###autoload (defun Man-context-menu (menu click) "Populate MENU with commands that open a man page at point." (save-excursion diff --git a/lisp/mouse.el b/lisp/mouse.el index cfe212c3e9b..46dd0397d7f 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -298,6 +298,9 @@ and should return the same menu with changes such as added new menu items." (function-item context-menu-buffers) (function-item context-menu-vc) (function-item context-menu-ffap) + (function-item Man-context-menu) + (function-item hi-lock-context-menu) + (function-item context-menu-online-search) (function :tag "Custom function"))) :version "28.1") -- 2.39.2