changeset 52648:928f0fb38bfa

(Info-find-index-name): Search both with and without the " <1>" etc. suffixes which makeinfo appends to duplicate index entries.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 28 Sep 2003 09:17:29 +0000
parents bd8fcbf75e4f
children 5eefee699ae5
files lisp/info.el
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/info.el	Sun Sep 28 09:05:31 2003 +0000
+++ b/lisp/info.el	Sun Sep 28 09:17:29 2003 +0000
@@ -2112,8 +2112,11 @@
 		 (search-forward
 		  (format "`%s'" (substring name 0 (match-beginning 1)))
 		  nil t))
-	    (search-forward name nil t))
-	(beginning-of-line)
+	    (search-forward name nil t)
+	    ;; Try again without the " <1>" makeinfo can append
+            (and (string-match "\\`\\(.*\\) <[0-9]+>\\'" name)
+                 (Info-find-index-name (match-string 1 name))))
+	(progn (beginning-of-line) t)  ;; non-nil for recursive call
       (goto-char (point-min)))))
 
 (defun Info-undefined ()