GNU bug report logs -
#58552
29.0.50; [PATCH] dictionary-lookup-definition "Wrong type argument" error when there is no word at point
Previous Next
Reported by: Daniel Martín <mardani29 <at> yahoo.es>
Date: Sat, 15 Oct 2022 19:37:01 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 58552 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
As far as I can tell, the message below was sent only to me.
But the message is strange. So I decided to forward it here.
------- Start of forwarded message -------
From: Daniel Martín <mardani29 <at> yahoo.es>
Date: Sat, 15 Oct 2022 21:25:59 +0200
Subject: [PATCH] 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.
- ---
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 @@ dictionary-search
(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."
- --
2.34.1
- --=-=-=--
------- End of forwarded message -------
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
This bug report was last modified 2 years and 219 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.