* lisp/net/dictionary.el (context-menu-dictionary): Add autoload cookie.
(context-menu-functions): Remove context-menu-dictionary from hook (bug#50552)
This commit is contained in:
parent
c4866ad1ac
commit
afee49fa08
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue