Commit 635173de authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(Info-find-node): Check for an anchor at the

proper place, before reading an indirect file.
parent acc9e99d
...@@ -475,6 +475,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." ...@@ -475,6 +475,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(if (marker-position Info-tag-table-marker) (if (marker-position Info-tag-table-marker)
(let (found-in-tag-table (let (found-in-tag-table
found-anchor
found-mode found-mode
(m Info-tag-table-marker)) (m Info-tag-table-marker))
(save-excursion (save-excursion
...@@ -484,7 +485,9 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." ...@@ -484,7 +485,9 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
;; Search tag table ;; Search tag table
(setq found-in-tag-table (setq found-in-tag-table
(re-search-forward regexp nil t)) (re-search-forward regexp nil t)
found-anchor
(string-equal "Ref:" (match-string 1)))
(if found-in-tag-table (if found-in-tag-table
(setq guesspos (1+ (read (current-buffer))))) (setq guesspos (1+ (read (current-buffer)))))
(setq found-mode major-mode)) (setq found-mode major-mode))
...@@ -503,9 +506,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself." ...@@ -503,9 +506,7 @@ In standalone mode, \\<Info-mode-map>\\[Info-exit] exits Emacs itself."
(setq guesspos (Info-read-subfile guesspos))))) (setq guesspos (Info-read-subfile guesspos)))))
;; Handle anchor ;; Handle anchor
(if (and found-in-tag-table (if found-anchor (goto-char guesspos)
(string-equal "Ref:" (match-string 1)))
(goto-char guesspos)
;; Else we may have a node, which we search for: ;; Else we may have a node, which we search for:
(goto-char (max (point-min) (goto-char (max (point-min)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment