X-Git-Url: http://cgit.sxemacs.org/?a=blobdiff_plain;f=texi%2Finfohack.el;h=4fe99499197cc5058c4a9aeb0ceee6f820d72b41;hb=fda79fc773c3018266173a6c4ea3776685845c1d;hp=d3e59a1c230af12ce750cc17554ee1db83bf644f;hpb=de689c11a44faf9b9d7fd0b95887ae7c248f1a8e;p=gnus diff --git a/texi/infohack.el b/texi/infohack.el index d3e59a1c2..4fe994991 100644 --- a/texi/infohack.el +++ b/texi/infohack.el @@ -30,11 +30,19 @@ (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. @@ -42,6 +50,7 @@ (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)))