[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 0a354d65784: Fix infloop in info-look.el
|
From: |
Eli Zaretskii |
|
Subject: |
emacs-29 0a354d65784: Fix infloop in info-look.el |
|
Date: |
Wed, 31 May 2023 10:50:51 -0400 (EDT) |
branch: emacs-29
commit 0a354d65784e5cd25da408c4b102fb1c15fa7a73
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix infloop in info-look.el
* lisp/info-look.el (info-lookup-guess-gdb-script-symbol): Fix
infloop when there are no completions. (Bug#63808)
---
lisp/info-look.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/info-look.el b/lisp/info-look.el
index 7858ed58774..da45e30cd36 100644
--- a/lisp/info-look.el
+++ b/lisp/info-look.el
@@ -733,7 +733,11 @@ Return nil if there is nothing appropriate in the buffer
near point."
(let ((str (string-join str-list " ")))
(when (assoc str completions)
(throw 'result str))
- (nbutlast str-list)))))))
+ ;; 'nbutlast' will not destructively set its argument
+ ;; to nil when the argument is a list of 1 element.
+ (if (= (length str-list) 1)
+ (setq str-list nil)
+ (nbutlast str-list))))))))
(error nil)))
;;;###autoload
| [Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 0a354d65784: Fix infloop in info-look.el,
Eli Zaretskii <=