2001-09-28 07:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 28 Sep 2001 11:11:11 +0000 (11:11 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Fri, 28 Sep 2001 11:11:11 +0000 (11:11 +0000)
* Makefile.in (.texi): Remove $@ first.

* infohack.el (infohack-remove-unsupported): Remove @iflatex lines.
(infohack): Specify a coding-system to save info files.
From Katsumi Yamaoka  <yamaoka@jpl.org>

texi/ChangeLog
texi/Makefile.in
texi/infohack.el

index 9a5dac2..5eab462 100644 (file)
@@ -1,3 +1,11 @@
+2001-09-28 07:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * Makefile.in (.texi): Remove $@ first.
+
+       * infohack.el (infohack-remove-unsupported): Remove @iflatex lines.
+       (infohack): Specify a coding-system to save info files.
+       From Katsumi Yamaoka  <yamaoka@jpl.org>
+       
 2001-09-28 00:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnusconfig.tex.in: Use cmss if pfu is not found.
index fb4f7eb..1043346 100644 (file)
@@ -30,6 +30,7 @@ most: texi2latex.elc latex latexps
        if test "x$(MAKEINFO)" != "xno" ; then \
          $(MAKEINFO) -I $(srcdir) -o $* $<; \
        else \
+         rm -f $@; \
          $(EMACSINFO) $<; \
        fi
 
@@ -41,13 +42,13 @@ pdf: tmps gnus.pdf message.pdf refcard.pdf emacs-mime.pdf
        sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi 
        $(TEXI2DVI) -I $(srcdir) gnustmp.texi
        cp gnustmp.dvi $*.dvi
-       rm gnustmp.*
+       rm -f gnustmp.*
 
 .texi.pdf :
        sed -e '/@iflatex/,/@end iflatex/d' $< > gnustmp.texi 
        $(TEXI2PDF) -I $(srcdir) gnustmp.texi
        cp gnustmp.pdf $*.pdf
-       rm gnustmp.*
+       rm -f gnustmp.*
 
 refcard.dvi: refcard.tex gnuslogo.refcard gnusref.tex
        TEXINPUTS=$(srcdir):$$TEXINPUTS $(LATEX) refcard.tex
index 0fa6af0..cdd9a34 100644 (file)
 (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)
-       (max-lisp-eval-depth (max max-lisp-eval-depth 600)))
+       (max-lisp-eval-depth (max max-lisp-eval-depth 600))
+       coding-system)
     (find-file file)
+    (setq coding-system buffer-file-coding-system)
     (infohack-remove-unsupported)
     (texinfo-every-node-update) 
     (texinfo-format-buffer t) ;; Don't save any file.
@@ -43,6 +49,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)))