diff options
author | Richard M. Stallman <rms@gnu.org> | 2002-09-09 19:24:53 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2002-09-09 19:24:53 +0000 |
commit | 112211d158b6b8a9090d6a3b53643411f5c8d74c (patch) | |
tree | c88a38622e20510d5cf15ba4f96222253f13ede5 /lisp/info.el | |
parent | ee291b4684fe84c1133d529816c8177a99bce9ba (diff) | |
download | emacs-112211d158b6b8a9090d6a3b53643411f5c8d74c.tar.gz |
(Info-search): Add (point-min) to subfile positions
to get them right. Skip the current subfile using forward-line.
Diffstat (limited to 'lisp/info.el')
-rw-r--r-- | lisp/info.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/info.el b/lisp/info.el index 4acc8bf320c..e9db8638768 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1192,18 +1192,22 @@ If FORK is a string, it is the name to use for the new buffer." (progn (search-forward "\n\^_") (1- (point)))) (goto-char (point-min)) + ;; Find the subfile we just searched. (search-forward (concat "\n" osubfile ": ")) - (beginning-of-line) + ;; Skip that one. + (forward-line 1) + ;; Make a list of all following subfiles. + ;; Each elt has the form (VIRT-POSITION . SUBFILENAME). (while (not (eobp)) (re-search-forward "\\(^.*\\): [0-9]+$") (goto-char (+ (match-end 1) 2)) - (setq list (cons (cons (read (current-buffer)) + (setq list (cons (cons (+ (point-min) + (read (current-buffer))) (match-string-no-properties 1)) list)) (goto-char (1+ (match-end 0)))) - (setq list (nreverse list) - current (car (car list)) - list (cdr list)))) + ;; Put in forward order + (setq list (nreverse list)))) (while list (message "Searching subfile %s..." (cdr (car list))) (Info-read-subfile (car (car list))) |