diff lisp/modes/tex-mode.el @ 84:ac0620f6398e r20-0b92

Import from CVS: tag r20-0b92
author cvs
date Mon, 13 Aug 2007 09:08:29 +0200
parents 131b0175ea99
children
line wrap: on
line diff
--- a/lisp/modes/tex-mode.el	Mon Aug 13 09:07:39 2007 +0200
+++ b/lisp/modes/tex-mode.el	Mon Aug 13 09:08:29 2007 +0200
@@ -65,12 +65,18 @@
   "*User defined LaTeX block names.
 Combined with `standard-latex-block-names' for minibuffer completion.")
 
+(defvar tex-latex-document-regex "documentstyle\\|documentclass"
+  "matches the first command of a LaTeX document")
+
 (defvar slitex-run-command "slitex"
   "*Command used to run SliTeX subjob.
 If this string contains an asterisk (*), it will be replaced by the
 filename; if not, the name of the file, preceded by blank, will be added to
 this string.")
 
+(defvar tex-slitex-document-regex "documentstyle{slides}"
+  "Matches the first command of a slitex document")
+  
 (defvar tex-bibtex-command "bibtex"
   "*Command used by `tex-bibtex-file' to gather bibliographic data.
 If this string contains an asterisk (*), it will be replaced by the
@@ -215,8 +221,8 @@
 				    (beginning-of-line)
 				    (search-forward "%" search-end t))))))
       (if (and slash (not comment))
-	  (setq mode (if (looking-at "documentstyle")
-                         (if (looking-at "documentstyle{slides}")
+	  (setq mode (if (looking-at tex-latex-document-regex)
+                         (if (looking-at tex-slitex-document-regex)
                              'slitex-mode
                            'latex-mode)
 		       'plain-tex-mode))))