[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116005: * lisp/info.el (Info-find-file): Go to DIR
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] trunk r116005: * lisp/info.el (Info-find-file): Go to DIR before displaying the error |
Date: |
Mon, 13 Jan 2014 08:04:21 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116005
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16405
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Mon 2014-01-13 10:04:09 +0200
message:
* 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.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/info.el info.el-20091113204419-o5vbwnq5f7feedwu-261
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-01-13 07:47:15 +0000
+++ b/lisp/ChangeLog 2014-01-13 08:04:09 +0000
@@ -1,3 +1,12 @@
+2014-01-13 Juri Linkov <address@hidden>
+
+ * 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 <address@hidden>
fit-frame/window-to-buffer code fixes including one for Bug#14096.
=== modified file 'lisp/info.el'
--- a/lisp/info.el 2014-01-10 07:26:04 +0000
+++ b/lisp/info.el 2014-01-13 08:04:09 +0000
@@ -925,7 +925,10 @@
(setq filename found)
(if noerror
(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))))
(defun Info-find-node (filename nodename &optional no-going-back strict-case)
@@ -1245,12 +1248,14 @@
(Info-find-index-name Info-point-loc)
(setq Info-point-loc nil))))))
;; If we did not finish finding the specified node,
- ;; go back to the previous one.
- (or Info-current-node no-going-back (null Info-history)
- (let ((hist (car Info-history)))
- (setq Info-history (cdr Info-history))
- (Info-find-node (nth 0 hist) (nth 1 hist) t)
- (goto-char (nth 2 hist))))))
+ ;; go back to the previous one or to the Top node.
+ (unless (or Info-current-node no-going-back)
+ (if Info-history
+ (let ((hist (car Info-history)))
+ (setq Info-history (cdr Info-history))
+ (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
;; it for the first time, so we can save time subsequently.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116005: * lisp/info.el (Info-find-file): Go to DIR before displaying the error,
Juri Linkov <=