Mercurial > emacs
comparison lisp/textmodes/texinfmt.el @ 91204:53108e6cea98
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-294
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 06 Dec 2007 09:51:45 +0000 |
parents | b83d0dadb2a7 2abbcd7bdb21 |
children | 2fcaae6177a5 |
comparison
equal
deleted
inserted
replaced
91203:db40129142b2 | 91204:53108e6cea98 |
---|---|
2999 ;;; @printindex | 2999 ;;; @printindex |
3000 | 3000 |
3001 (put 'printindex 'texinfo-format 'texinfo-format-printindex) | 3001 (put 'printindex 'texinfo-format 'texinfo-format-printindex) |
3002 | 3002 |
3003 (defun texinfo-format-printindex () | 3003 (defun texinfo-format-printindex () |
3004 (let ((indexelts (symbol-value | 3004 (let* ((arg (texinfo-parse-arg-discard)) |
3005 (cdr (assoc (texinfo-parse-arg-discard) | 3005 (fmt (cdr (assoc arg texinfo-short-index-format-cmds-alist))) |
3006 texinfo-indexvar-alist)))) | 3006 (index-list (delq nil (mapcar (lambda (e) |
3007 opoint) | 3007 (and (eq fmt (get (cdr e) 'texinfo-format)) |
3008 (cdr (assoc (car e) texinfo-indexvar-alist)))) | |
3009 texinfo-short-index-cmds-alist))) | |
3010 (indexelts (apply #'append nil (mapcar #'symbol-value index-list))) | |
3011 opoint) | |
3008 (insert "\n* Menu:\n\n") | 3012 (insert "\n* Menu:\n\n") |
3009 (setq opoint (point)) | 3013 (setq opoint (point)) |
3010 (texinfo-print-index nil indexelts) | 3014 (texinfo-print-index nil indexelts) |
3011 | |
3012 (if (memq system-type '(vax-vms windows-nt ms-dos)) | 3015 (if (memq system-type '(vax-vms windows-nt ms-dos)) |
3013 (texinfo-sort-region opoint (point)) | 3016 (texinfo-sort-region opoint (point)) |
3014 (shell-command-on-region opoint (point) "sort -fd" 1)))) | 3017 (shell-command-on-region opoint (point) "sort -fd" 1)))) |
3015 | 3018 |
3016 (defun texinfo-print-index (file indexelts) | 3019 (defun texinfo-print-index (file indexelts) |