From 55f9feda4f89a14e4f4f32d0ce4a4ea7d2ad978e Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 14 Sep 1999 06:44:55 +0000 Subject: [PATCH] (Info-find-node): Cope better if guesspos is too large. --- lisp/info.el | 9 +++++++-- 1 file 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-exit] exits Emacs itself." (goto-char (setq anchorpos guesspos)) ;; Else we may have a node, which we search for: - (goto-char (max (point-min) - (- (byte-to-position guesspos) 1000))) + (let ((guesschar + (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 ;; (or from beg of buffer) ;; to find the actual node. -- 2.39.5