mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
(Info-search): Add (point-min) to subfile positions
to get them right. Skip the current subfile using forward-line.
This commit is contained in:
parent
ee291b4684
commit
112211d158
14
lisp/info.el
14
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\^_")
|
(progn (search-forward "\n\^_")
|
||||||
(1- (point))))
|
(1- (point))))
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
|
;; Find the subfile we just searched.
|
||||||
(search-forward (concat "\n" osubfile ": "))
|
(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))
|
(while (not (eobp))
|
||||||
(re-search-forward "\\(^.*\\): [0-9]+$")
|
(re-search-forward "\\(^.*\\): [0-9]+$")
|
||||||
(goto-char (+ (match-end 1) 2))
|
(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))
|
(match-string-no-properties 1))
|
||||||
list))
|
list))
|
||||||
(goto-char (1+ (match-end 0))))
|
(goto-char (1+ (match-end 0))))
|
||||||
(setq list (nreverse list)
|
;; Put in forward order
|
||||||
current (car (car list))
|
(setq list (nreverse list))))
|
||||||
list (cdr list))))
|
|
||||||
(while list
|
(while list
|
||||||
(message "Searching subfile %s..." (cdr (car list)))
|
(message "Searching subfile %s..." (cdr (car list)))
|
||||||
(Info-read-subfile (car (car list)))
|
(Info-read-subfile (car (car list)))
|
||||||
|
Loading…
Reference in New Issue
Block a user