diff options
author | Katsumi Yamaoka <yamaoka@jpl.org> | 2008-09-25 23:09:28 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2008-09-25 23:09:28 +0000 |
commit | 4b93c9d5464797479056056d4a53304414517682 (patch) | |
tree | 2423dc9679d492449567815cd1cecd66868b237c /lisp/informat.el | |
parent | 67885e8cbe4b187a56d4b82e7b6c4a1c18645771 (diff) | |
download | emacs-4b93c9d5464797479056056d4a53304414517682.tar.gz |
* informat.el (Info-split-threshold): New variable.
(Info-split): Use it.
* textmodes/texinfmt.el (texinfo-format-buffer):
Use Info-split-threshold to decide whether to split Info files.
Diffstat (limited to 'lisp/informat.el')
-rw-r--r-- | lisp/informat.el | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/informat.el b/lisp/informat.el index 0fd12f3565f..0324e1a8311 100644 --- a/lisp/informat.el +++ b/lisp/informat.el @@ -153,9 +153,17 @@ ;;;###autoload +(defcustom Info-split-threshold 262144 + "The number of characters by which `Info-split' splits an info file." + :type 'integer + :version "23.1" + :group 'texinfo) + +;;;###autoload (defun Info-split () "Split an info file into an indirect file plus bounded-size subfiles. -Each subfile will be up to 50,000 characters plus one node. +Each subfile will be up to the number of characters that +`Info-split-threshold' specifies, plus one node. To use this command, first visit a large Info file that has a tag table. The buffer is modified into a (small) indirect info file which @@ -167,7 +175,7 @@ file name. The indirect file still functions as an Info file, but it contains just the tag table and a directory of subfiles." (interactive) - (if (< (buffer-size) 70000) + (if (< (buffer-size) (+ 20000 Info-split-threshold)) (error "This is too small to be worth splitting")) (goto-char (point-min)) (search-forward "\^_") @@ -192,7 +200,7 @@ contains just the tag table and a directory of subfiles." (narrow-to-region (point-min) (point)) (goto-char (point-min)) (while (< (1+ (point)) (point-max)) - (goto-char (min (+ (point) 50000) (point-max))) + (goto-char (min (+ (point) Info-split-threshold) (point-max))) (search-forward "\^_" nil 'move) (setq subfiles (cons (list (+ start chars-deleted) |