From: yamaoka Date: Thu, 10 Apr 2008 04:01:32 +0000 (+0000) Subject: * infohack.el: Make XEmacs reduce the number of split Info files as well. X-Git-Tag: ngnus-0_8-doc-ja~2 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51572cd684a33c9c3c9e174eb0452dc93e2f8111;p=elisp%2Fgnus-doc-ja.git * infohack.el: Make XEmacs reduce the number of split Info files as well. (infohack-texi-format): Bind coding-system-for-read to iso-2022-7bit for XEmacs. --- diff --git a/ChangeLog b/ChangeLog index 99f3b6a..b99430f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-04-10 Katsumi Yamaoka + + * infohack.el: Make XEmacs reduce the number of split Info files as + well. + (infohack-texi-format): Bind coding-system-for-read to iso-2022-7bit + for XEmacs. + 2008-02-08 Katsumi Yamaoka * Makefile.in (datarootdir): Define. diff --git a/infohack.el b/infohack.el index 25eafc3..0d4e976 100644 --- a/infohack.el +++ b/infohack.el @@ -90,18 +90,33 @@ Both characters must have the same length of multi-byte form." (require 'bytecomp) ;; Reduce the number of split Info files. -(require 'informat) -(let* ((fn (symbol-function 'Info-split)) - (fns (prin1-to-string fn))) - (when (string-match "\\([\t\n ]+\\)50000\\([\t\n ]+\\)" fns) - (condition-case nil - (fset 'Info-split (read (replace-match "\\1200000\\2" nil nil fns))) - (error - (fset 'Info-split fn))))) +(if (featurep 'xemacs) + (if (load "informat.el" t t) + (let* ((fn (symbol-function 'Info-split)) + (fns (prin1-to-string fn))) + (load "informat.elc" t t) + (when (and (string-match "\\([\t\n ]+\\)50000\\([\t\n )]+\\)" fns) + (condition-case nil + (setq fn (byte-compile + (read (replace-match "\\1200000\\2" nil nil + fns)))) + (error nil)) + (fset 'Info-split fn))))) + (require 'informat) + (let* ((fn (symbol-function 'Info-split)) + (fns (prin1-to-string fn))) + (when (string-match "\\([\t\n ]+\\)50000\\([\t\n ]+\\)" fns) + (condition-case nil + (fset 'Info-split (read (replace-match "\\1200000\\2" nil nil fns))) + (error + (fset 'Info-split fn)))))) (defun infohack-texi-format (file &optional addsuffix) (let ((auto-save-default nil) (find-file-run-dired nil) + (coding-system-for-read (if (featurep 'xemacs) + 'iso-2022-7bit + coding-system-for-read)) coding-system-for-write (error 0)) (condition-case err