;;; informat.el --- info support functions package for Emacs
-;; Copyright (C) 1986, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 2001-2012 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: help
(declare-function texinfo-format-refill "texinfmt" ())
+;; From texinfmt.el
+(defvar texinfo-command-start)
+(defvar texinfo-command-end)
+
;;;###autoload
(defun Info-tagify (&optional input-buffer-name)
"Create or update Info file tag table in current buffer or in a region."
"Tagifying %s done" (file-name-nondirectory (buffer-file-name)))))
\f
+;;;###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
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 "\^_")
(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)
nil ;(message "Checking validity of info file %s... OK" file)
(message "----------------------------------------------------------------------")
(message ">> PROBLEMS IN INFO FILE %s" file)
- (save-excursion
- (set-buffer loss-name)
+ (with-current-buffer loss-name
(princ (buffer-substring-no-properties
(point-min) (point-max))))
(message "----------------------------------------------------------------------")
(provide 'informat)
-;; arch-tag: 581c440e-5be1-4f31-b005-2d5824bbf569
;;; informat.el ends here