Commit 55f9feda authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Info-find-node): Cope better if guesspos is too large.

parent 81e9cc86
...@@ -527,8 +527,13 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." ...@@ -527,8 +527,13 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(goto-char (setq anchorpos guesspos)) (goto-char (setq anchorpos guesspos))
;; Else we may have a node, which we search for: ;; Else we may have a node, which we search for:
(goto-char (max (point-min) (let ((guesschar
(- (byte-to-position guesspos) 1000))) (or (byte-to-position guesspos)
(if (< (position-bytes (point-max)) guesspos)
(point-max)
(point-min)))))
(goto-char (max (point-min)
(- guesschar 1000))))
;; Now search from our advised position ;; Now search from our advised position
;; (or from beg of buffer) ;; (or from beg of buffer)
;; to find the actual node. ;; to find the actual node.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment