From: yamaoka Date: Thu, 25 Sep 2008 23:11:36 +0000 (+0000) Subject: * infohack.el: Don't do a workaround reducing the number of split Info files if X-Git-Tag: ngnus-0_11-doc-ja~136 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=13bf74410705efe6cf2cc69ba7442869e1cbae28;p=elisp%2Fgnus-doc-ja.git * infohack.el: Don't do a workaround reducing the number of split Info files if Info-split-threshold has been introduced in Emacs; adjust the number of split for old Emacsen. --- diff --git a/ChangeLog b/ChangeLog index 4af6336..5ac849c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-25 Katsumi Yamaoka + + * infohack.el: Don't do a workaround reducing the number of split Info + files if Info-split-threshold has been introduced in Emacs; adjust the + number of split for old Emacsen. + 2008-05-21 Katsumi Yamaoka * Gnus-Doc-Ja: The version for No Gnus v0.10 is released. diff --git a/infohack.el b/infohack.el index edb2ec8..a9af043 100644 --- a/infohack.el +++ b/infohack.el @@ -79,7 +79,9 @@ (expand-file-name (file-name-nondirectory buffer-file-name) default-directory)) (setq buffer-file-coding-system coding-system) - (if (> (buffer-size) 100000) + (if (> (buffer-size) (if (boundp 'Info-split-threshold) + (+ 50000 Info-split-threshold) + 100000)) (Info-split)) (save-buffer))) @@ -114,26 +116,28 @@ Both characters must have the same length of multi-byte form." (require 'bytecomp) ;; Reduce the number of split Info files. -(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)))))) +(unless (boundp 'Info-split-threshold) + (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 "\\1262144\\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 "\\1262144\\2" + nil nil fns))) + (error + (fset 'Info-split fn))))))) (defun infohack-texi-format (file &optional addsuffix) (let ((auto-save-default nil)