# HG changeset patch # User Richard M. Stallman # Date 937291495 0 # Node ID b6b86ee3839127c0058a2d3ae86ed237f68fc2e3 # Parent fed6ebbe8644c7ae64fcfd5f2d80831a2528ad01 (Info-find-node): Cope better if guesspos is too large. diff -r fed6ebbe8644 -r b6b86ee38391 lisp/info.el --- a/lisp/info.el Tue Sep 14 01:50:00 1999 +0000 +++ b/lisp/info.el Tue Sep 14 06:44:55 1999 +0000 @@ -527,8 +527,13 @@ (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.