(defun infohack-remove-unsupported ()
(goto-char (point-min))
(while (re-search-forward "@\\(end \\)?ifnottex" nil t)
- (replace-match "")))
+ (replace-match ""))
+ (goto-char (point-min))
+ (while (search-forward "\n@iflatex\n" nil t)
+ (delete-region (1+ (match-beginning 0))
+ (search-forward "\n@end iflatex\n"))))
(defun infohack (file)
- (let ((dest-directory default-directory))
+ (let ((dest-directory default-directory)
+ (max-lisp-eval-depth (max max-lisp-eval-depth 600))
+ coding-system)
(find-file file)
+ (setq buffer-read-only nil)
+ (setq coding-system buffer-file-coding-system)
(infohack-remove-unsupported)
(texinfo-every-node-update)
(texinfo-format-buffer t) ;; Don't save any file.
(setq buffer-file-name
(expand-file-name (file-name-nondirectory buffer-file-name)
default-directory))
+ (setq buffer-file-coding-system coding-system)
(if (> (buffer-size) 100000)
(Info-split))
(save-buffer)))