aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-06-06 21:15:03 +0000
committerStefan Monnier2005-06-06 21:15:03 +0000
commit29a47b89ace7745fab5ca91e487fe32565ba0e2f (patch)
tree75f587ea4bdd86281b42d6371c0470ebb7da7c33
parent7ad046405db028a9012aeacb8da7b32dc471c905 (diff)
downloademacs-29a47b89ace7745fab5ca91e487fe32565ba0e2f.tar.gz
emacs-29a47b89ace7745fab5ca91e487fe32565ba0e2f.zip
(tex-guess-mode): Add RequirePackage.
(tex-compile-default): In the absence of any history, use the order in tex-compile-alist to choose the preferred command. (tex-compile-commands): Reorder a bit.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/textmodes/tex-mode.el17
2 files changed, 13 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e18366bb692..c6e5323109d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12005-06-06 Stefan Monnier <monnier@iro.umontreal.ca> 12005-06-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * textmodes/tex-mode.el (tex-guess-mode): Add RequirePackage.
4 (tex-compile-default): In the absence of any history, use the order in
5 tex-compile-alist to choose the preferred command.
6 (tex-compile-commands): Reorder a bit.
7
3 * textmodes/flyspell.el (flyspell-auto-correct-binding) 8 * textmodes/flyspell.el (flyspell-auto-correct-binding)
4 (flyspell-incorrect-face, flyspell-duplicate-face): 9 (flyspell-incorrect-face, flyspell-duplicate-face):
5 Use (X)Emacs-agnostic code. 10 Use (X)Emacs-agnostic code.
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 66dc7b83507..a715900b604 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -795,7 +795,7 @@ Inherits `shell-mode-map' with a few additions.")
795 (regexp-opt '("documentstyle" "documentclass" 795 (regexp-opt '("documentstyle" "documentclass"
796 "begin" "subsection" "section" 796 "begin" "subsection" "section"
797 "part" "chapter" "newcommand" 797 "part" "chapter" "newcommand"
798 "renewcommand") 'words) 798 "renewcommand" "RequirePackage") 'words)
799 "\\|NeedsTeXFormat{LaTeX"))) 799 "\\|NeedsTeXFormat{LaTeX")))
800 (if (and (looking-at 800 (if (and (looking-at
801 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}") 801 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}")
@@ -1639,9 +1639,12 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1639 " " (if (< 0 (length tex-start-commands)) 1639 " " (if (< 0 (length tex-start-commands))
1640 (shell-quote-argument tex-start-commands)) " %f") 1640 (shell-quote-argument tex-start-commands)) " %f")
1641 t "%r.dvi") 1641 t "%r.dvi")
1642 ("yap %r &" "%r.dvi")
1643 ("xdvi %r &" "%r.dvi") 1642 ("xdvi %r &" "%r.dvi")
1643 ("xpdf %r.pdf &" "%r.pdf")
1644 ("gv %r.ps &" "%r.ps")
1645 ("yap %r &" "%r.dvi")
1644 ("advi %r &" "%r.dvi") 1646 ("advi %r &" "%r.dvi")
1647 ("gv %r.pdf &" "%r.pdf")
1645 ("bibtex %r" "%r.aux" "%r.bbl") 1648 ("bibtex %r" "%r.aux" "%r.bbl")
1646 ("makeindex %r" "%r.idx" "%r.ind") 1649 ("makeindex %r" "%r.idx" "%r.ind")
1647 ("texindex %r.??") 1650 ("texindex %r.??")
@@ -1649,9 +1652,6 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1649 ("dvipdf %r" "%r.dvi" "%r.pdf") 1652 ("dvipdf %r" "%r.dvi" "%r.pdf")
1650 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps") 1653 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps")
1651 ("ps2pdf %r.ps" "%r.ps" "%r.pdf") 1654 ("ps2pdf %r.ps" "%r.ps" "%r.pdf")
1652 ("gv %r.ps &" "%r.ps")
1653 ("gv %r.pdf &" "%r.pdf")
1654 ("xpdf %r.pdf &" "%r.pdf")
1655 ("lpr %r.ps" "%r.ps")) 1655 ("lpr %r.ps" "%r.ps"))
1656 "List of commands for `tex-compile'. 1656 "List of commands for `tex-compile'.
1657Each element should be of the form (FORMAT IN OUT) where 1657Each element should be of the form (FORMAT IN OUT) where
@@ -1830,8 +1830,7 @@ FILE is typically the output DVI or PDF file."
1830 (push cmd cmds) 1830 (push cmd cmds)
1831 (push (nth 1 cmd) unchanged-in)))) 1831 (push (nth 1 cmd) unchanged-in))))
1832 ;; If no command seems to be applicable, arbitrarily pick the first one. 1832 ;; If no command seems to be applicable, arbitrarily pick the first one.
1833 (unless cmds 1833 (setq cmds (if cmds (nreverse cmds) (list (car tex-compile-commands))))
1834 (setq cmds (list (car tex-compile-commands))))
1835 ;; Remove those commands whose input was considered stable for 1834 ;; Remove those commands whose input was considered stable for
1836 ;; some other command (typically if (t . "%.pdf") is inactive 1835 ;; some other command (typically if (t . "%.pdf") is inactive
1837 ;; then we're using pdflatex and the fact that the dvi file 1836 ;; then we're using pdflatex and the fact that the dvi file
@@ -1841,7 +1840,7 @@ FILE is typically the output DVI or PDF file."
1841 (unless (member (nth 1 cmd) unchanged-in) 1840 (unless (member (nth 1 cmd) unchanged-in)
1842 (push cmd tmp))) 1841 (push cmd tmp)))
1843 ;; Only remove if there's something left. 1842 ;; Only remove if there's something left.
1844 (if tmp (setq cmds tmp))) 1843 (if tmp (setq cmds (nreverse tmp))))
1845 ;; Remove commands whose input is not uptodate either. 1844 ;; Remove commands whose input is not uptodate either.
1846 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds))) 1845 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds)))
1847 (tmp nil)) 1846 (tmp nil))
@@ -1849,7 +1848,7 @@ FILE is typically the output DVI or PDF file."
1849 (unless (member (nth 1 cmd) outs) 1848 (unless (member (nth 1 cmd) outs)
1850 (push cmd tmp))) 1849 (push cmd tmp)))
1851 ;; Only remove if there's something left. 1850 ;; Only remove if there's something left.
1852 (if tmp (setq cmds tmp))) 1851 (if tmp (setq cmds (nreverse tmp))))
1853 ;; Select which file we're going to operate on (the latest). 1852 ;; Select which file we're going to operate on (the latest).
1854 (let ((latest (nth 1 (car cmds)))) 1853 (let ((latest (nth 1 (car cmds))))
1855 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds))))) 1854 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds)))))