aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-09-09 19:24:53 +0000
committerRichard M. Stallman2002-09-09 19:24:53 +0000
commit112211d158b6b8a9090d6a3b53643411f5c8d74c (patch)
treec88a38622e20510d5cf15ba4f96222253f13ede5
parentee291b4684fe84c1133d529816c8177a99bce9ba (diff)
downloademacs-112211d158b6b8a9090d6a3b53643411f5c8d74c.tar.gz
emacs-112211d158b6b8a9090d6a3b53643411f5c8d74c.zip
(Info-search): Add (point-min) to subfile positions
to get them right. Skip the current subfile using forward-line.
-rw-r--r--lisp/info.el14
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."
1192 (progn (search-forward "\n\^_") 1192 (progn (search-forward "\n\^_")
1193 (1- (point)))) 1193 (1- (point))))
1194 (goto-char (point-min)) 1194 (goto-char (point-min))
1195 ;; Find the subfile we just searched.
1195 (search-forward (concat "\n" osubfile ": ")) 1196 (search-forward (concat "\n" osubfile ": "))
1196 (beginning-of-line) 1197 ;; Skip that one.
1198 (forward-line 1)
1199 ;; Make a list of all following subfiles.
1200 ;; Each elt has the form (VIRT-POSITION . SUBFILENAME).
1197 (while (not (eobp)) 1201 (while (not (eobp))
1198 (re-search-forward "\\(^.*\\): [0-9]+$") 1202 (re-search-forward "\\(^.*\\): [0-9]+$")
1199 (goto-char (+ (match-end 1) 2)) 1203 (goto-char (+ (match-end 1) 2))
1200 (setq list (cons (cons (read (current-buffer)) 1204 (setq list (cons (cons (+ (point-min)
1205 (read (current-buffer)))
1201 (match-string-no-properties 1)) 1206 (match-string-no-properties 1))
1202 list)) 1207 list))
1203 (goto-char (1+ (match-end 0)))) 1208 (goto-char (1+ (match-end 0))))
1204 (setq list (nreverse list) 1209 ;; Put in forward order
1205 current (car (car list)) 1210 (setq list (nreverse list))))
1206 list (cdr list))))
1207 (while list 1211 (while list
1208 (message "Searching subfile %s..." (cdr (car list))) 1212 (message "Searching subfile %s..." (cdr (car list)))
1209 (Info-read-subfile (car (car list))) 1213 (Info-read-subfile (car (car list)))