auctex-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-commit] Changes to auctex/font-latex.el,v


From: Ralf Angeli
Subject: [AUCTeX-commit] Changes to auctex/font-latex.el,v
Date: Mon, 09 Apr 2007 15:46:46 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    07/04/09 15:46:46

Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.164
retrieving revision 5.165
diff -u -b -r5.164 -r5.165
--- font-latex.el       19 Mar 2007 19:02:52 -0000      5.164
+++ font-latex.el       9 Apr 2007 15:46:46 -0000       5.165
@@ -808,9 +808,17 @@
                                       (regexp-opt verb-macros-with-braces))
          font-latex-syntactic-keywords nil)
     (unless (= (length verb-envs) 0)
+      ;; We assume that the \begin part of verbatim environments can
+      ;; be preceded by all sorts of junk on the same line except
+      ;; comment characters, but the \end part only by whitespace.
+      ;; (The comment character matching is not exact since they could
+      ;; be escaped which is not being checked.)  The \end part of the
+      ;; vanilla verbatim environment should actually not even be
+      ;; preceded by whitespace since a spurious newline would be
+      ;; inserted in the typeset result in this case.
       (add-to-list 'font-latex-syntactic-keywords
-                  `(,(concat "^[ \t]*\\\\begin *{\\(?:" verb-envs
-                             "\\)}.*\\(\n\\)")
+                  `(,(concat "\\(?:^\\|^[^%\n]*[^\\%]\\)\\(?:\\\\\\\\\\)*\
+\\\\begin *{\\(?:" verb-envs "\\)}.*\\(\n\\)")
                     (1 "|" t)))
       (add-to-list 'font-latex-syntactic-keywords
                   ;; Using the newline character for the syntax




reply via email to

[Prev in Thread] Current Thread [Next in Thread]