branch: elpa
commit 75d672cfd20f47e2fd8271551b5e299f204b56c5
Author: Tassilo Horn <t...@gnu.org>
Commit: Tassilo Horn <t...@gnu.org>

    Improve font-locking of verbatim environments
    
    * font-latex.el (font-latex-set-syntactic-keywords): Handle case where
      verbatim content immediately follows \begin{verb-env}.
---
 font-latex.el |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/font-latex.el b/font-latex.el
index 12ebd04..71004cd 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -941,7 +941,10 @@ have changed."
                       ;; another mandatory argument(s) (e.g. with VerbatimOut 
or
                       ;; the minted envs or defined with `lstnewenvironment').
                       "\\(?:{[^}]+}\\)*"
-                      "\\(\n\\)")
+                      ;; Now match the final newline.  The "." alternative
+                      ;; catches the case where verbatim content is written
+                      ;; immediately after the \begin{verbatim}.
+                      "\\(\n\\|.\\)")
                     (1 "|" t)))
       (add-to-list 'font-latex-syntactic-keywords
                   ;; Using the newline character for the syntax

Reply via email to