emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] elpa 75d672c 09/16: Improve font-locking of verbatim environments


From: Tassilo Horn
Subject: [elpa] elpa 75d672c 09/16: Improve font-locking of verbatim environments
Date: Fri, 14 Oct 2016 16:03:33 +0000 (UTC)

branch: elpa
commit 75d672cfd20f47e2fd8271551b5e299f204b56c5
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    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

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