X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/69ab3201ca6f6ef1414d678fd9cb13dd4d6f6b95..7c2fb837ec2f0e0a509f22ccc35f9b43476a6119:/lisp/textmodes/texinfmt.el diff --git a/lisp/textmodes/texinfmt.el b/lisp/textmodes/texinfmt.el index bbf0714e8a..412c25aa09 100644 --- a/lisp/textmodes/texinfmt.el +++ b/lisp/textmodes/texinfmt.el @@ -2963,29 +2963,6 @@ Default is to leave paragraph indentation as is." ("ky" . texinfo-format-kindex))) -;;; Sort and index (for VMS) - -;; Sort an index which is in the current buffer between START and END. -;; Used on VMS, where the `sort' utility is not available. -(defun texinfo-sort-region (start end) - (require 'sort) - (save-restriction - (narrow-to-region start end) - (goto-char (point-min)) - (sort-subr nil 'forward-line 'end-of-line 'texinfo-sort-startkeyfun))) - -;; Subroutine for sorting an index. -;; At start of a line, return a string to sort the line under. -(defun texinfo-sort-startkeyfun () - (let ((line (buffer-substring-no-properties (point) (line-end-position)))) - ;; Canonicalize whitespace and eliminate funny chars. - (while (string-match "[ \t][ \t]+\\|[^a-z0-9 ]+" line) - (setq line (concat (substring line 0 (match-beginning 0)) - " " - (substring line (match-end 0))))) - line)) - - ;;; @printindex (put 'printindex 'texinfo-format 'texinfo-format-printindex) @@ -3002,9 +2979,7 @@ Default is to leave paragraph indentation as is." (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)))) + (shell-command-on-region opoint (point) "sort -fd" 1))) (defun texinfo-print-index (file indexelts) (while indexelts