[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9528: 24.0.50; Info navigation
From: |
Juri Linkov |
Subject: |
bug#9528: 24.0.50; Info navigation |
Date: |
Tue, 20 Sep 2011 19:30:01 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu) |
>> >> So if you really insist on having your behavior, then add a custom
>> >> var (which should default to follow the superficial behavior),
>> >> which you can then set in your .emacs.
>> >
>> > Fine with me.
>>
>> Do you think such a custom var should have a broad definition to provide
>> complete compatibility in all functionality with the stand-alone reader
>> or be specific just wrt the behavior of `l'?
>
> I'm not aware of any other compatibility issues.
I found another compatibility issue.
1. Run `emacs -Q'
2. `C-h i m elisp RET g Macros RET'
3. `[' (`Info-backward-node') goes to "Related Topics".
4. `l' goes back to the previously selected node "Macros".
1. Run `info'
2. `m elisp RET g Macros RET'
3. `[' (`Info-backward-node') goes to "Related Topics".
4. `l' goes to the node "Functions", not "Macros".
The behavior of the Emacs Info reader to skip intermediate nodes by default
dates back to the first version of info.el at 1991-07-13.
If you think that behavior of the stand-alone Info reader
is more traditional, we could install this patch:
=== modified file 'lisp/info.el'
--- lisp/info.el 2011-09-18 18:56:22 +0000
+++ lisp/info.el 2011-09-20 16:12:12 +0000
@@ -52,6 +52,15 @@ (defvar Info-history-list nil
"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.
@@ -2673,10 +2682,13 @@ (defun Info-forward-node (&optional not-
"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")))))
@@ -2698,10 +2710,12 @@ (defun Info-backward-node ()
;; 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")))))
@@ -2757,8 +2771,10 @@ (defun Info-next-preorder ()
;; 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"))))
@@ -2771,24 +2787,28 @@ (defun Info-last-preorder ()
;; 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))
- bug#9528: 24.0.50; Info navigation, (continued)
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Dani Moncayo, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Dani Moncayo, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Stefan Monnier, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Stefan Monnier, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation,
Juri Linkov <=
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/20
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/20
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/20
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/20
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Dani Moncayo, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Eli Zaretskii, 2011/09/19
- bug#9528: 24.0.50; Info navigation, Juri Linkov, 2011/09/20