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

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

[elpa] elpa 785eabf 11/16: Don't require \end{env} is on a separate line


From: Tassilo Horn
Subject: [elpa] elpa 785eabf 11/16: Don't require \end{env} is on a separate line
Date: Fri, 14 Oct 2016 16:03:33 +0000 (UTC)

branch: elpa
commit 785eabfd6dc8ad1b174bdad449cb2a7d408e1a69
Author: Tassilo Horn <address@hidden>
Commit: Tassilo Horn <address@hidden>

    Don't require \end{env} is on a separate line
    
    * font-latex.el (font-latex-make-user-keywords):
    (font-latex-set-syntactic-keywords): Don't require that \end{env} is on
    a line of its own.  Also allow empty mandatory argument in verbatim
    environments.
---
 font-latex.el |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index 71004cd..fb7f8d6 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -805,7 +805,7 @@ Generated by `font-latex-make-user-keywords'.")))
             ;; Hack to remove the verbatim face from the \ in
             ;; \end{verbatim} and similar.  The same hack is used in
             ;; tex-mode.el.
-            ("^[ \t]*\\(\\\\\\)end"
+            ("\\(\\\\\\)end"
              (1 (get-text-property (match-end 1) 'face) t))))
     (add-to-list 'font-latex-keywords-1 item)
     (add-to-list 'font-latex-keywords-2 item))
@@ -940,7 +940,7 @@ have changed."
                       ;; After the optional argument, there may also be
                       ;; another mandatory argument(s) (e.g. with VerbatimOut 
or
                       ;; the minted envs or defined with `lstnewenvironment').
-                      "\\(?:{[^}]+}\\)*"
+                      "\\(?:{[^}]*}\\)*"
                       ;; Now match the final newline.  The "." alternative
                       ;; catches the case where verbatim content is written
                       ;; immediately after the \begin{verbatim}.
@@ -954,7 +954,7 @@ have changed."
                   ;; the starting backslash of \end.  There is a hack
                   ;; in `font-latex-make-user-keywords' to remove the
                   ;; spurious fontification of the backslash.
-                  `(,(concat "^[ \t]*\\(\\\\\\)end *{\\(?:" verb-envs "\\)}")
+                  `(,(concat "\\(\\\\\\)end *{\\(?:" verb-envs "\\)}")
                     (1 "|" t))))
     (unless (= (length verb-macros-with-delims) 0)
       (add-to-list 'font-latex-syntactic-keywords



reply via email to

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