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)
This commit is contained in:
parent
83b22139e4
commit
0a354d6578
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue