[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105858: * lisp/info.el (Info-history
From: |
Juri Linkov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105858: * lisp/info.el (Info-history-skip-intermediate-nodes): New defcustom. |
Date: |
Tue, 20 Sep 2011 23:16:42 +0300 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105858
fixes bug(s): http://debbugs.gnu.org/9528
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Tue 2011-09-20 23:16:42 +0300
message:
* lisp/info.el (Info-history-skip-intermediate-nodes): New defcustom.
(Info-forward-node, Info-backward-node, Info-next-preorder)
(Info-last-preorder): Use it.
modified:
lisp/ChangeLog
lisp/info.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-09-20 16:28:07 +0000
+++ b/lisp/ChangeLog 2011-09-20 20:16:42 +0000
@@ -1,5 +1,11 @@
2011-09-20 Juri Linkov <address@hidden>
+ * info.el (Info-history-skip-intermediate-nodes): New defcustom.
+ (Info-forward-node, Info-backward-node, Info-next-preorder)
+ (Info-last-preorder): Use it. (Bug#9528)
+
+2011-09-20 Juri Linkov <address@hidden>
+
* info.el (Info-last-preorder): Visit last menu item only when
`Info-scroll-prefer-subnodes' is non-nil (third test-case of bug#9528).
=== modified file 'lisp/info.el'
--- a/lisp/info.el 2011-09-20 16:28:07 +0000
+++ b/lisp/info.el 2011-09-20 20:16:42 +0000
@@ -52,6 +52,15 @@
"List of all Info nodes user has visited.
Each element of the list is a list (FILENAME NODENAME).")
+(defcustom Info-history-skip-intermediate-nodes t
+ "Non-nil means don't record intermediate Info nodes to the history.
+Intermediate Info nodes are nodes visited by Info internally in the process of
+searching the node to display. Intermediate nodes are not presented
+to the user."
+ :type 'boolean
+ :group 'info
+ :version "24.1")
+
(defcustom Info-enable-edit nil
"Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info can edit
the current node.
This is convenient if you want to write Info files by hand.
@@ -2668,10 +2677,13 @@
"top")))
(let ((old-node Info-current-node))
(Info-up)
- (let (Info-history success)
+ (let ((old-history Info-history)
+ success)
(unwind-protect
(setq success (Info-forward-node t nil no-error))
- (or success (Info-goto-node old-node))))))
+ (or success (Info-goto-node old-node)))
+ (if Info-history-skip-intermediate-nodes
+ (setq Info-history old-history)))))
(no-error nil)
(t (error "No pointer forward from this node")))))
@@ -2693,10 +2705,12 @@
;; If we move back at the same level,
;; go down to find the last subnode*.
(Info-prev)
- (let (Info-history)
+ (let ((old-history Info-history))
(while (and (not (Info-index-node))
(save-excursion (search-forward "\n* Menu:" nil t)))
- (Info-goto-node (Info-extract-menu-counting nil)))))
+ (Info-goto-node (Info-extract-menu-counting nil)))
+ (if Info-history-skip-intermediate-nodes
+ (setq Info-history old-history))))
(t
(error "No pointer backward from this node")))))
@@ -2752,8 +2766,10 @@
;; Since logically we are done with the node with that menu,
;; move on from it. But don't add intermediate nodes
;; to the history on recursive calls.
- (let (Info-history)
- (Info-next-preorder)))
+ (let ((old-history Info-history))
+ (Info-next-preorder)
+ (if Info-history-skip-intermediate-nodes
+ (setq Info-history old-history))))
(t
(error "No more nodes"))))
@@ -2767,24 +2783,28 @@
;; so we can scroll back through it.
(goto-char (point-max))))
;; Keep going down, as long as there are nested menu nodes.
- (let (Info-history) ; Don't add intermediate nodes to the history.
+ (let ((old-history Info-history))
(while (Info-no-error
(Info-last-menu-item)
;; If we go down a menu item, go to the end of the node
;; so we can scroll back through it.
- (goto-char (point-max)))))
+ (goto-char (point-max))))
+ (if Info-history-skip-intermediate-nodes
+ (setq Info-history old-history)))
(recenter -1))
((and (Info-no-error (Info-extract-pointer "prev"))
(not (equal (Info-extract-pointer "up")
(Info-extract-pointer "prev"))))
(Info-no-error (Info-prev))
(goto-char (point-max))
- (let (Info-history) ; Don't add intermediate nodes to the history.
+ (let ((old-history Info-history))
(while (Info-no-error
(Info-last-menu-item)
;; If we go down a menu item, go to the end of the node
;; so we can scroll back through it.
- (goto-char (point-max)))))
+ (goto-char (point-max))))
+ (if Info-history-skip-intermediate-nodes
+ (setq Info-history old-history)))
(recenter -1))
((Info-no-error (Info-up t))
(goto-char (point-min))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105858: * lisp/info.el (Info-history-skip-intermediate-nodes): New defcustom.,
Juri Linkov <=