diff options
author | Richard M. Stallman <rms@gnu.org> | 1992-08-14 07:50:26 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1992-08-14 07:50:26 +0000 |
commit | 433b3065047b86eeabebc7e518c98c69be605ef5 (patch) | |
tree | bb4a6bb538c83e19bccbab39f0146ef6e71baadf | |
parent | 118d5ebae0af0d26dff79f5d48d42aeb1323baca (diff) | |
download | emacs-433b3065047b86eeabebc7e518c98c69be605ef5.tar.gz |
*** empty log message ***
-rw-r--r-- | lisp/info.el | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lisp/info.el b/lisp/info.el index 996c35152d6..a044aa77796 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -186,15 +186,16 @@ to read a file name from the minibuffer." (progn (setq Info-current-node nodename) (Info-set-mode-line)) ;; Search file for a suitable node. - ;; First get advice from tag table if file has one. - ;; Also, if this is an indirect info file, - ;; read the proper subfile into this buffer. - (let ((guesspos (point-min))) + (let ((guesspos (point-min)) + (regexp (concat "Node: *" (regexp-quote nodename) " *[,\t\n\177]"))) + ;; First get advice from tag table if file has one. + ;; Also, if this is an indirect info file, + ;; read the proper subfile into this buffer. (if (marker-position Info-tag-table-marker) (save-excursion (set-buffer (marker-buffer Info-tag-table-marker)) (goto-char Info-tag-table-marker) - (if (search-forward (concat "Node: " nodename "\177") nil t) + (if (re-search-forward regexp nil t) (progn (setq guesspos (read (current-buffer))) ;; If this is an indirect file, @@ -204,10 +205,9 @@ to read a file name from the minibuffer." (setq guesspos (Info-read-subfile guesspos)))) (error "No such node: \"%s\"" nodename)))) - (goto-char (max (point-min) (- guesspos 1000)))) - ;; Now search from our advised position (or from beg of buffer) - ;; to find the actual node. - (let ((regexp (concat "Node: *" (regexp-quote nodename) " *[,\t\n]"))) + (goto-char (max (point-min) (- guesspos 1000))) + ;; Now search from our advised position (or from beg of buffer) + ;; to find the actual node. (catch 'foo (while (search-forward "\n\^_" nil t) (forward-line 1) |