aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/info.el19
2 files changed, 21 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8508ca7b357..93436bf3cb3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
12014-01-13 Juri Linkov <juri@jurta.org>
2
3 * info.el (Info-find-file): Go to DIR before displaying the error
4 about a nonexistent file if no previous Info file is visited.
5 Use `user-error' instead of `error' for "Info file %s does not exist".
6 (Info-find-node-2): In case of a nonexistent node in unwind forms
7 go to the Top node if there is no previous node to revert to.
8 (Bug#16405)
9
12014-01-13 Martin Rudalics <rudalics@gmx.at> 102014-01-13 Martin Rudalics <rudalics@gmx.at>
2 11
3 fit-frame/window-to-buffer code fixes including one for Bug#14096. 12 fit-frame/window-to-buffer code fixes including one for Bug#14096.
diff --git a/lisp/info.el b/lisp/info.el
index 74bdef5b050..78e0dda7cf7 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -925,7 +925,10 @@ just return nil (no error)."
925 (setq filename found) 925 (setq filename found)
926 (if noerror 926 (if noerror
927 (setq filename nil) 927 (setq filename nil)
928 (error "Info file %s does not exist" filename))) 928 ;; If there is no previous Info file, go to the directory.
929 (unless Info-current-file
930 (Info-directory))
931 (user-error "Info file %s does not exist" filename)))
929 filename)))) 932 filename))))
930 933
931(defun Info-find-node (filename nodename &optional no-going-back strict-case) 934(defun Info-find-node (filename nodename &optional no-going-back strict-case)
@@ -1245,12 +1248,14 @@ is non-nil)."
1245 (Info-find-index-name Info-point-loc) 1248 (Info-find-index-name Info-point-loc)
1246 (setq Info-point-loc nil)))))) 1249 (setq Info-point-loc nil))))))
1247 ;; If we did not finish finding the specified node, 1250 ;; If we did not finish finding the specified node,
1248 ;; go back to the previous one. 1251 ;; go back to the previous one or to the Top node.
1249 (or Info-current-node no-going-back (null Info-history) 1252 (unless (or Info-current-node no-going-back)
1250 (let ((hist (car Info-history))) 1253 (if Info-history
1251 (setq Info-history (cdr Info-history)) 1254 (let ((hist (car Info-history)))
1252 (Info-find-node (nth 0 hist) (nth 1 hist) t) 1255 (setq Info-history (cdr Info-history))
1253 (goto-char (nth 2 hist)))))) 1256 (Info-find-node (nth 0 hist) (nth 1 hist) t)
1257 (goto-char (nth 2 hist)))
1258 (Info-find-node Info-current-file "Top" t)))))
1254 1259
1255;; Cache the contents of the (virtual) dir file, once we have merged 1260;; Cache the contents of the (virtual) dir file, once we have merged
1256;; it for the first time, so we can save time subsequently. 1261;; it for the first time, so we can save time subsequently.