mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-27 07:37:33 +00:00
* lisp/info.el (Info-find-file): Go to DIR before displaying the error
about a nonexistent file if no previous Info file is visited. Use `user-error' instead of `error' for "Info file %s does not exist". (Info-find-node-2): In case of a nonexistent node in unwind forms go to the Top node if there is no previous node to revert to. Fixes: debbugs:16405
This commit is contained in:
parent
25a700d0fd
commit
3c0c4562d1
@ -1,3 +1,12 @@
|
|||||||
|
2014-01-13 Juri Linkov <juri@jurta.org>
|
||||||
|
|
||||||
|
* info.el (Info-find-file): Go to DIR before displaying the error
|
||||||
|
about a nonexistent file if no previous Info file is visited.
|
||||||
|
Use `user-error' instead of `error' for "Info file %s does not exist".
|
||||||
|
(Info-find-node-2): In case of a nonexistent node in unwind forms
|
||||||
|
go to the Top node if there is no previous node to revert to.
|
||||||
|
(Bug#16405)
|
||||||
|
|
||||||
2014-01-13 Martin Rudalics <rudalics@gmx.at>
|
2014-01-13 Martin Rudalics <rudalics@gmx.at>
|
||||||
|
|
||||||
fit-frame/window-to-buffer code fixes including one for Bug#14096.
|
fit-frame/window-to-buffer code fixes including one for Bug#14096.
|
||||||
|
19
lisp/info.el
19
lisp/info.el
@ -925,7 +925,10 @@ just return nil (no error)."
|
|||||||
(setq filename found)
|
(setq filename found)
|
||||||
(if noerror
|
(if noerror
|
||||||
(setq filename nil)
|
(setq filename nil)
|
||||||
(error "Info file %s does not exist" filename)))
|
;; If there is no previous Info file, go to the directory.
|
||||||
|
(unless Info-current-file
|
||||||
|
(Info-directory))
|
||||||
|
(user-error "Info file %s does not exist" filename)))
|
||||||
filename))))
|
filename))))
|
||||||
|
|
||||||
(defun Info-find-node (filename nodename &optional no-going-back strict-case)
|
(defun Info-find-node (filename nodename &optional no-going-back strict-case)
|
||||||
@ -1245,12 +1248,14 @@ is non-nil)."
|
|||||||
(Info-find-index-name Info-point-loc)
|
(Info-find-index-name Info-point-loc)
|
||||||
(setq Info-point-loc nil))))))
|
(setq Info-point-loc nil))))))
|
||||||
;; If we did not finish finding the specified node,
|
;; If we did not finish finding the specified node,
|
||||||
;; go back to the previous one.
|
;; go back to the previous one or to the Top node.
|
||||||
(or Info-current-node no-going-back (null Info-history)
|
(unless (or Info-current-node no-going-back)
|
||||||
(let ((hist (car Info-history)))
|
(if Info-history
|
||||||
(setq Info-history (cdr Info-history))
|
(let ((hist (car Info-history)))
|
||||||
(Info-find-node (nth 0 hist) (nth 1 hist) t)
|
(setq Info-history (cdr Info-history))
|
||||||
(goto-char (nth 2 hist))))))
|
(Info-find-node (nth 0 hist) (nth 1 hist) t)
|
||||||
|
(goto-char (nth 2 hist)))
|
||||||
|
(Info-find-node Info-current-file "Top" t)))))
|
||||||
|
|
||||||
;; Cache the contents of the (virtual) dir file, once we have merged
|
;; Cache the contents of the (virtual) dir file, once we have merged
|
||||||
;; it for the first time, so we can save time subsequently.
|
;; it for the first time, so we can save time subsequently.
|
||||||
|
Loading…
Reference in New Issue
Block a user