emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master afee49f: * lisp/net/dictionary.el (context-menu-dictionary): Add


From: Juri Linkov
Subject: master afee49f: * lisp/net/dictionary.el (context-menu-dictionary): Add autoload cookie.
Date: Wed, 29 Sep 2021 03:19:36 -0400 (EDT)

branch: master
commit afee49fa0842f21ac008995a288be3f71c55800e
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/net/dictionary.el (context-menu-dictionary): Add autoload cookie.
    
    (context-menu-functions): Remove context-menu-dictionary from hook 
(bug#50552)
---
 lisp/net/dictionary.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 09d250f..86447c2 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1375,8 +1375,12 @@ any buffer where (dictionary-tooltip-mode 1) has been 
called."
                  (current-word)))))
     (dictionary-search word)))
 
+;;;###autoload
 (defun context-menu-dictionary (menu click)
-  "Populate MENU with dictionary commands at CLICK."
+  "Populate MENU with dictionary commands at CLICK.
+When you add this function to `context-menu-functions',
+the context menu will contain an item that searches
+the word at mouse click."
   (when (thing-at-mouse click 'word)
     (define-key menu [dictionary-separator] menu-bar-separator)
     (define-key menu [dictionary-search-word-at-mouse]
@@ -1384,7 +1388,5 @@ any buffer where (dictionary-tooltip-mode 1) has been 
called."
                   :help "Search the word at mouse click in dictionary")))
   menu)
 
-(add-hook 'context-menu-functions 'context-menu-dictionary 15)
-
 (provide 'dictionary)
 ;;; dictionary.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]