From b76be815c5ad7d17ced428f48bebfce8f4a37119 Mon Sep 17 00:00:00 2001 From: kaoru Date: Fri, 22 Sep 2000 08:55:43 +0000 Subject: [PATCH] * utils/ptexinfmt.el (texinfo-format-printindex): Add broken-facility check, for Mule for Windows. (texinfo-format-printindex): New function. --- utils/ptexinfmt.el | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/utils/ptexinfmt.el b/utils/ptexinfmt.el index a073db9..2f5ec13 100644 --- a/utils/ptexinfmt.el +++ b/utils/ptexinfmt.el @@ -44,6 +44,15 @@ (defvar ptexinfmt-disable-broken-notice t "If non-nil disable notice, when call `broken-facility'.") +;; sort -fd +(broken-facility texinfo-format-printindex + "Can't sort on Windows." + (if (and (memq system-type '(windows-nt ms-dos)) + (string< texinfmt-version "2.37 of 24 May 1997")) + nil + t) + ptexinfmt-disable-broken-notice) + ;; @var (broken-facility texinfo-format-var "Don't perse @var argument." @@ -724,4 +733,22 @@ This command is executed when texinfmt sees @item inside @multitable." (kill-buffer texinfo-multitable-buffer-name) (setq fill-column existing-fill-column))) + +(when-broken texinfo-format-printindex + (fmakunbound 'texinfo-format-printindex)) + +(defun-maybe texinfo-format-printindex () + (let ((indexelts (symbol-value + (cdr (assoc (texinfo-parse-arg-discard) + texinfo-indexvar-alist)))) + 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)))) + + ;;; ptexinfmt.el ends here -- 1.7.10.4