aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
authorKaroly Lorentey2005-06-15 12:57:51 +0000
committerKaroly Lorentey2005-06-15 12:57:51 +0000
commitef85512e51f043d73788f00a2aed13cccde0682c (patch)
treefc1fa1378533250f260ef8eaa9a84ae882d9df84 /lisp/textmodes/tex-mode.el
parent8736257554f49445f7b4402ac7a9436b38ce6452 (diff)
parentef88a9999004e6c26148c8d280d6a41f623d7249 (diff)
downloademacs-ef85512e51f043d73788f00a2aed13cccde0682c.tar.gz
emacs-ef85512e51f043d73788f00a2aed13cccde0682c.zip
Merged from miles@gnu.org--gnu-2005 (patch 80-82, 350-422)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-350 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-351 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-352 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-353 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-354 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-355 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-356 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-357 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-358 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-359 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-360 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-361 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-362 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-363 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-364 Remove "-face" suffix from widget faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-365 Remove "-face" suffix from custom faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-366 Remove "-face" suffix from change-log faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-367 Remove "-face" suffix from compilation faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-368 Remove "-face" suffix from diff-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-369 lisp/longlines.el (longlines-visible-face): Face removed * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-370 Remove "-face" suffix from woman faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-371 Remove "-face" suffix from whitespace-highlight face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-372 Remove "-face" suffix from ruler-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-373 Remove "-face" suffix from show-paren faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-374 Remove "-face" suffix from log-view faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-375 Remove "-face" suffix from smerge faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-376 Remove "-face" suffix from show-tabs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-377 Remove "-face" suffix from highlight-changes faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-378 Remove "-face" suffix from and downcase info faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-379 Remove "-face" suffix from pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-380 Update uses of renamed pcvs faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-381 Tweak ChangeLog * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-382 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-383 Remove "-face" suffix from strokes-char face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-384 Remove "-face" suffix from compare-windows face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-385 Remove "-face" suffix from calendar faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-386 Remove "-face" suffix from diary-button face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-387 Remove "-face" suffix from testcover faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-388 Remove "-face" suffix from viper faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-389 Remove "-face" suffix from org faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-390 Remove "-face" suffix from sgml-namespace face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-391 Remove "-face" suffix from table-cell face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-393 Remove "-face" suffix from texinfo-heading face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-394 Remove "-face" suffix from flyspell faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-395 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-396 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-397 Remove "-face" suffix from gomoku faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-398 Remove "-face" suffix from mpuz faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-399 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-400 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-401 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-402 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-403 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-404 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-405 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-406 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-407 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-408 Remove "-face" suffix from Buffer-menu-buffer face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-409 Remove "-face" suffix from antlr-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-410 Remove "-face" suffix from ebrowse faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-411 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-412 Remove "-face" suffix from flymake faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-413 Remove "-face" suffix from idlwave faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-414 Remove "-face" suffix from sh-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-415 Remove "-face" suffix from vhdl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-416 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-417 Remove "-face" suffix from which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-418 Remove "-face" suffix from cperl-mode faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-419 Remove "-face" suffix from ld-script faces * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-420 Fix cperl-mode font-lock problem * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-421 Tweak which-func face * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-422 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-80 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-81 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-82 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-350
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el32
1 files changed, 18 insertions, 14 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 66dc7b83507..7d04464346a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -650,17 +650,22 @@ An alternative value is \" . \", if you use a font with a narrow period."
650 "Face used for subscripts." 650 "Face used for subscripts."
651 :group 'tex) 651 :group 'tex)
652 652
653(defface tex-math-face 653(defface tex-math
654 '((t :inherit font-lock-string-face)) 654 '((t :inherit font-lock-string-face))
655 "Face used to highlight TeX math expressions." 655 "Face used to highlight TeX math expressions."
656 :group 'tex) 656 :group 'tex)
657(defvar tex-math-face 'tex-math-face) 657;; backward-compatibility alias
658(defface tex-verbatim-face 658(put 'tex-math-face 'face-alias 'tex-math)
659(defvar tex-math-face 'tex-math)
660
661(defface tex-verbatim
659 ;; '((t :inherit font-lock-string-face)) 662 ;; '((t :inherit font-lock-string-face))
660 '((t :family "courier")) 663 '((t :family "courier"))
661 "Face used to highlight TeX verbatim environments." 664 "Face used to highlight TeX verbatim environments."
662 :group 'tex) 665 :group 'tex)
663(defvar tex-verbatim-face 'tex-verbatim-face) 666;; backward-compatibility alias
667(put 'tex-verbatim-face 'face-alias 'tex-verbatim)
668(defvar tex-verbatim-face 'tex-verbatim)
664 669
665;; Use string syntax but math face for $...$. 670;; Use string syntax but math face for $...$.
666(defun tex-font-lock-syntactic-face-function (state) 671(defun tex-font-lock-syntactic-face-function (state)
@@ -795,7 +800,7 @@ Inherits `shell-mode-map' with a few additions.")
795 (regexp-opt '("documentstyle" "documentclass" 800 (regexp-opt '("documentstyle" "documentclass"
796 "begin" "subsection" "section" 801 "begin" "subsection" "section"
797 "part" "chapter" "newcommand" 802 "part" "chapter" "newcommand"
798 "renewcommand") 'words) 803 "renewcommand" "RequirePackage") 'words)
799 "\\|NeedsTeXFormat{LaTeX"))) 804 "\\|NeedsTeXFormat{LaTeX")))
800 (if (and (looking-at 805 (if (and (looking-at
801 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}") 806 "document\\(style\\|class\\)\\(\\[.*\\]\\)?{slides}")
@@ -1101,7 +1106,7 @@ Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote'
1101inserts \" characters." 1106inserts \" characters."
1102 (interactive "*P") 1107 (interactive "*P")
1103 (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\)) 1108 (if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\))
1104 (eq (get-text-property (point) 'face) 'tex-verbatim-face) 1109 (eq (get-text-property (point) 'face) tex-verbatim-face)
1105 (save-excursion 1110 (save-excursion
1106 (backward-char (length tex-open-quote)) 1111 (backward-char (length tex-open-quote))
1107 (when (or (looking-at (regexp-quote tex-open-quote)) 1112 (when (or (looking-at (regexp-quote tex-open-quote))
@@ -1639,9 +1644,12 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1639 " " (if (< 0 (length tex-start-commands)) 1644 " " (if (< 0 (length tex-start-commands))
1640 (shell-quote-argument tex-start-commands)) " %f") 1645 (shell-quote-argument tex-start-commands)) " %f")
1641 t "%r.dvi") 1646 t "%r.dvi")
1642 ("yap %r &" "%r.dvi")
1643 ("xdvi %r &" "%r.dvi") 1647 ("xdvi %r &" "%r.dvi")
1648 ("xpdf %r.pdf &" "%r.pdf")
1649 ("gv %r.ps &" "%r.ps")
1650 ("yap %r &" "%r.dvi")
1644 ("advi %r &" "%r.dvi") 1651 ("advi %r &" "%r.dvi")
1652 ("gv %r.pdf &" "%r.pdf")
1645 ("bibtex %r" "%r.aux" "%r.bbl") 1653 ("bibtex %r" "%r.aux" "%r.bbl")
1646 ("makeindex %r" "%r.idx" "%r.ind") 1654 ("makeindex %r" "%r.idx" "%r.ind")
1647 ("texindex %r.??") 1655 ("texindex %r.??")
@@ -1649,9 +1657,6 @@ If NOT-ALL is non-nil, save the `.dvi' file."
1649 ("dvipdf %r" "%r.dvi" "%r.pdf") 1657 ("dvipdf %r" "%r.dvi" "%r.pdf")
1650 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps") 1658 ("dvips -o %r.ps %r" "%r.dvi" "%r.ps")
1651 ("ps2pdf %r.ps" "%r.ps" "%r.pdf") 1659 ("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")) 1660 ("lpr %r.ps" "%r.ps"))
1656 "List of commands for `tex-compile'. 1661 "List of commands for `tex-compile'.
1657Each element should be of the form (FORMAT IN OUT) where 1662Each element should be of the form (FORMAT IN OUT) where
@@ -1830,8 +1835,7 @@ FILE is typically the output DVI or PDF file."
1830 (push cmd cmds) 1835 (push cmd cmds)
1831 (push (nth 1 cmd) unchanged-in)))) 1836 (push (nth 1 cmd) unchanged-in))))
1832 ;; If no command seems to be applicable, arbitrarily pick the first one. 1837 ;; If no command seems to be applicable, arbitrarily pick the first one.
1833 (unless cmds 1838 (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 1839 ;; Remove those commands whose input was considered stable for
1836 ;; some other command (typically if (t . "%.pdf") is inactive 1840 ;; some other command (typically if (t . "%.pdf") is inactive
1837 ;; then we're using pdflatex and the fact that the dvi file 1841 ;; then we're using pdflatex and the fact that the dvi file
@@ -1841,7 +1845,7 @@ FILE is typically the output DVI or PDF file."
1841 (unless (member (nth 1 cmd) unchanged-in) 1845 (unless (member (nth 1 cmd) unchanged-in)
1842 (push cmd tmp))) 1846 (push cmd tmp)))
1843 ;; Only remove if there's something left. 1847 ;; Only remove if there's something left.
1844 (if tmp (setq cmds tmp))) 1848 (if tmp (setq cmds (nreverse tmp))))
1845 ;; Remove commands whose input is not uptodate either. 1849 ;; Remove commands whose input is not uptodate either.
1846 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds))) 1850 (let ((outs (delq nil (mapcar (lambda (x) (nth 2 x)) cmds)))
1847 (tmp nil)) 1851 (tmp nil))
@@ -1849,7 +1853,7 @@ FILE is typically the output DVI or PDF file."
1849 (unless (member (nth 1 cmd) outs) 1853 (unless (member (nth 1 cmd) outs)
1850 (push cmd tmp))) 1854 (push cmd tmp)))
1851 ;; Only remove if there's something left. 1855 ;; Only remove if there's something left.
1852 (if tmp (setq cmds tmp))) 1856 (if tmp (setq cmds (nreverse tmp))))
1853 ;; Select which file we're going to operate on (the latest). 1857 ;; Select which file we're going to operate on (the latest).
1854 (let ((latest (nth 1 (car cmds)))) 1858 (let ((latest (nth 1 (car cmds))))
1855 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds))))) 1859 (dolist (cmd (prog1 (cdr cmds) (setq cmds (list (car cmds)))))