auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. e515ecd5da1ebada550cd


From: Tassilo Horn
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. e515ecd5da1ebada550cd8d62a2f48c569671d85
Date: Mon, 18 Aug 2014 07:56:41 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  e515ecd5da1ebada550cd8d62a2f48c569671d85 (commit)
      from  6d4f7d1b0300baf6e44eb80c392de1c01758b699 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e515ecd5da1ebada550cd8d62a2f48c569671d85
Author: Tassilo Horn <address@hidden>
Date:   Mon Aug 18 09:56:05 2014 +0200

    Font-lock fix for verbatim environment args.
    
    * font-latex.el (font-latex-set-syntactic-keywords): Allow for a
    mandatory argument for a verbatim environment.

diff --git a/ChangeLog b/ChangeLog
index 19e019c..791a5a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-18  Tassilo Horn  <address@hidden>
+
+       * font-latex.el (font-latex-set-syntactic-keywords): Allow for a
+       mandatory argument for a verbatim environment.
+
 2014-08-15  Vladimir Lomov  <address@hidden>
 
        * style/mathtools.el ("mathtools"): Don't use the removed
diff --git a/font-latex.el b/font-latex.el
index 217d302..b6226b1 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -906,10 +906,11 @@ have changed."
       (add-to-list 'font-latex-syntactic-keywords
                   `(,(concat
                       "^[ \t]*\\\\begin *{\\(?:" verb-envs "\\)}"
-                      ;; Some environments accept an optional argument that can
-                      ;; span over more lines.  Between "\begin{<envname>}" and
-                      ;; the optional argument there can be whitespaces and the
-                      ;; newline can be commented by a "%" character.
+                      ;; Some environments accept an optional and/or mandatory
+                      ;; argument that can span over more lines.  Between
+                      ;; "\begin{<envname>}" and the optional argument there
+                      ;; can be whitespaces and the newline can be commented
+                      ;; by a "%" character.
                       "[ \t]*\\(?:%.*\n[ \t]*\\)?"
                       ;; The following line of the regexp matches the optional
                       ;; argument and allows for up to one level of brackets
@@ -917,6 +918,10 @@ have changed."
                       ;; in the `lstlisting' environment by the `listings'
                       ;; package).
                       "\\(?:\\[[^\]\[]*\\(?:\\[[^\]\[]*\\][^\]\[]*\\)*\\]\\)?"
+                      ;; After the optional argument, there may also be
+                      ;; another mandatory argument (e.g. with VerbatimOut or
+                      ;; the minted envs).
+                      "\\(?:{[^}]+}\\)?"
                       "\\(\n\\)")
                     (1 "|" t)))
       (add-to-list 'font-latex-syntactic-keywords

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    5 +++++
 font-latex.el |   13 +++++++++----
 2 files changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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