changeset 86206:2abbcd7bdb21

(texinfo-format-printindex): Collect combined indexes using texinfo-short-index-format-cmds-alist.
author Juri Linkov <juri@jurta.org>
date Sun, 18 Nov 2007 12:45:14 +0000
parents e15f3a10f775
children 90d3744545c1
files lisp/textmodes/texinfmt.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/texinfmt.el	Sun Nov 18 10:26:50 2007 +0000
+++ b/lisp/textmodes/texinfmt.el	Sun Nov 18 12:45:14 2007 +0000
@@ -3001,14 +3001,17 @@
 (put 'printindex 'texinfo-format 'texinfo-format-printindex)
 
 (defun texinfo-format-printindex ()
-  (let ((indexelts (symbol-value
-                    (cdr (assoc (texinfo-parse-arg-discard)
-                                texinfo-indexvar-alist))))
-        opoint)
+  (let* ((arg (texinfo-parse-arg-discard))
+         (fmt (cdr (assoc arg texinfo-short-index-format-cmds-alist)))
+         (index-list (delq nil (mapcar (lambda (e)
+                                         (and (eq fmt (get (cdr e) 'texinfo-format))
+                                              (cdr (assoc (car e) texinfo-indexvar-alist))))
+                                       texinfo-short-index-cmds-alist)))
+         (indexelts (apply #'append nil (mapcar #'symbol-value index-list)))
+         opoint)
     (insert "\n* Menu:\n\n")
     (setq opoint (point))
     (texinfo-print-index nil indexelts)
-
     (if (memq system-type '(vax-vms windows-nt ms-dos))
         (texinfo-sort-region opoint (point))
       (shell-command-on-region opoint (point) "sort -fd" 1))))