mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-26 07:33:47 +00:00
Signal an error in dictionary lookup if there's no word at point
* lisp/net/dictionary.el (dictionary-lookup-definition): Signal an error when there is no word at point (bug#58552).
This commit is contained in:
parent
45aabe6eda
commit
f9726408f6
@ -1173,7 +1173,10 @@ allows editing it."
|
||||
(defun dictionary-lookup-definition ()
|
||||
"Unconditionally lookup the word at point."
|
||||
(interactive)
|
||||
(dictionary-new-search (cons (current-word) dictionary-default-dictionary)))
|
||||
(let ((word (current-word)))
|
||||
(unless word
|
||||
(error "No word at point"))
|
||||
(dictionary-new-search (cons word dictionary-default-dictionary))))
|
||||
|
||||
(defun dictionary-previous ()
|
||||
"Go to the previous location in the current buffer."
|
||||
|
Loading…
Reference in New Issue
Block a user