aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1999-09-14 06:44:55 +0000
committerRichard M. Stallman1999-09-14 06:44:55 +0000
commit55f9feda4f89a14e4f4f32d0ce4a4ea7d2ad978e (patch)
treebe235d6859461122eddf91ba3eba4f94b56c9979
parent81e9cc861ae8e46181d5de425bb339b977c5f548 (diff)
downloademacs-55f9feda4f89a14e4f4f32d0ce4a4ea7d2ad978e.tar.gz
emacs-55f9feda4f89a14e4f4f32d0ce4a4ea7d2ad978e.zip
(Info-find-node): Cope better if guesspos is too large.
-rw-r--r--lisp/info.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/info.el b/lisp/info.el
index 4a7eea2bca1..94c71c2f841 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -527,8 +527,13 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
527 (goto-char (setq anchorpos guesspos)) 527 (goto-char (setq anchorpos guesspos))
528 528
529 ;; Else we may have a node, which we search for: 529 ;; Else we may have a node, which we search for:
530 (goto-char (max (point-min) 530 (let ((guesschar
531 (- (byte-to-position guesspos) 1000))) 531 (or (byte-to-position guesspos)
532 (if (< (position-bytes (point-max)) guesspos)
533 (point-max)
534 (point-min)))))
535 (goto-char (max (point-min)
536 (- guesschar 1000))))
532 ;; Now search from our advised position 537 ;; Now search from our advised position
533 ;; (or from beg of buffer) 538 ;; (or from beg of buffer)
534 ;; to find the actual node. 539 ;; to find the actual node.