branch: externals/auctex commit 901b20a29361df62d85f3053995cc4a80845a502 Merge: 95bef06 e515ecd Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Merge branch 'master' into simplify-TeX-parse-error --- ChangeLog | 5 +++++ font-latex.el | 13 +++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19e019c..791a5a1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-08-18 Tassilo Horn <t...@gnu.org> + + * font-latex.el (font-latex-set-syntactic-keywords): Allow for a + mandatory argument for a verbatim environment. + 2014-08-15 Vladimir Lomov <lomov...@gmail.com> * 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