summaryrefslogtreecommitdiff
path: root/lisp/info.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2000-12-15 22:03:05 +0000
committerEli Zaretskii <eliz@gnu.org>2000-12-15 22:03:05 +0000
commitb24e84ab41942e4f7bb7574df59bb1cf1f8aebdf (patch)
tree36742e27b4c60d24444a53a1e806188be5944765 /lisp/info.el
parente87b88097267da7cdcf24e05abbce48fb356b71d (diff)
downloademacs-b24e84ab41942e4f7bb7574df59bb1cf1f8aebdf.tar.gz
(Info-forward-node): If the node has an
Info-header-line, widen the buffer before searching for "next:" and "up:" pointers, and set the search limit to stay in the current node.
Diffstat (limited to 'lisp/info.el')
-rw-r--r--lisp/info.el22
1 files changed, 20 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 3b2e675f7f1..21e32e76a4b 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -1521,10 +1521,28 @@ N is the digit argument used to invoke this command."
(not (string-match "\\<index\\>" Info-current-node)))
(Info-goto-node (Info-extract-menu-counting 1))
t)
- ((save-excursion (search-backward "next:" nil t))
+ ((save-excursion
+ (save-restriction
+ (let (limit)
+ (when Info-header-line
+ (goto-char (point-min))
+ (widen)
+ (forward-line -1)
+ (setq limit (point))
+ (forward-line 1))
+ (search-backward "next:" limit t))))
(Info-next)
t)
- ((and (save-excursion (search-backward "up:" nil t))
+ ((and (save-excursion
+ (save-restriction
+ (let (limit)
+ (when Info-header-line
+ (goto-char (point-min))
+ (widen)
+ (forward-line -1)
+ (setq limit (point))
+ (forward-line 1))
+ (search-backward "up:" limit t))))
;; Use string-equal, not equal, to ignore text props.
(not (string-equal (downcase (Info-extract-pointer "up"))
"top")))