[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f9726408f6: Signal an error in dictionary lookup if there's no wo
From: |
Lars Ingebrigtsen |
Subject: |
master f9726408f6: Signal an error in dictionary lookup if there's no word at point |
Date: |
Sun, 16 Oct 2022 05:25:58 -0400 (EDT) |
branch: master
commit f9726408f6cb56b3a97a9e76be166a5156faec0b
Author: Daniel MartÃn <mardani29@yahoo.es>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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).
---
lisp/net/dictionary.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index 4c52382c67..b8f5018005 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -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."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f9726408f6: Signal an error in dictionary lookup if there's no word at point,
Lars Ingebrigtsen <=