changeset 47327:94b3c6a53104

(Info-search): Add (point-min) to subfile positions to get them right. Skip the current subfile using forward-line.
author Richard M. Stallman <rms@gnu.org>
date Mon, 09 Sep 2002 19:24:53 +0000
parents fc1a7db42eee
children ac7145660745
files lisp/info.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Mon Sep 09 19:23:37 2002 +0000
+++ b/lisp/info.el	Mon Sep 09 19:24:53 2002 +0000
@@ -1192,18 +1192,22 @@
 				      (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)))