mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Make Info completion more robust
* lisp/info.el (Info-build-node-completions): Don't signal an error if there are no nodes in the file we're computing completions over (bug#47771).
This commit is contained in:
parent
b61c828ea3
commit
f0648fef35
1 changed files with 11 additions and 4 deletions
15
lisp/info.el
15
lisp/info.el
|
|
@ -1882,10 +1882,17 @@ the Top node in FILENAME."
|
|||
(or (cdr (assoc filename Info-file-completions))
|
||||
(with-temp-buffer
|
||||
(Info-mode)
|
||||
(Info-goto-node (format "(%s)Top" filename))
|
||||
(Info-build-node-completions-1)
|
||||
(push (cons filename Info-current-file-completions) Info-file-completions)
|
||||
Info-current-file-completions))
|
||||
(condition-case nil
|
||||
(Info-goto-node (format "(%s)Top" filename))
|
||||
;; `Info-goto-node' signals a `user-error' when there
|
||||
;; are no nodes in the file in question (for instance,
|
||||
;; if it's not actually an Info file).
|
||||
(user-error nil)
|
||||
(:success
|
||||
(Info-build-node-completions-1)
|
||||
(push (cons filename Info-current-file-completions)
|
||||
Info-file-completions)
|
||||
Info-current-file-completions))))
|
||||
(or Info-current-file-completions
|
||||
(Info-build-node-completions-1))))
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue