auctex-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/auctex d3d9dc089b 16/37: Disallow opening square bracke


From: Tassilo Horn
Subject: [elpa] externals/auctex d3d9dc089b 16/37: Disallow opening square brackets as verb delimiter
Date: Wed, 11 Oct 2023 03:41:55 -0400 (EDT)

branch: externals/auctex
commit d3d9dc089b4b4f1aa07d162da6c054f45d42e28a
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Disallow opening square brackets as verb delimiter
    
    * font-latex.el (font-latex-set-syntactic-keywords): Disallow '['
    as verbatim delimiter in order to fix fontification problems and
    catch up with `LaTeX-verbatim-macro-boundaries'.
---
 font-latex.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/font-latex.el b/font-latex.el
index 7617b5cc84..8fc567e292 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1083,8 +1083,10 @@ have changed."
                   "\\(?:\\[[^][]*\\(?:\\[[^][]*\\][^][]*\\)*\\]\\)?"
                   ;; An opening curly brace as delimiter is valid, but
                   ;; allowing it might screw up fontification of stuff
-                  ;; like "\url{...} foo \textbf{<--!...}".
-                  "\\([^a-z@*\n\f{]\\).*?"
+                  ;; like "\url{...} foo \textbf{<--!...}".  Also
+                  ;; disallow an opening square bracket which produces
+                  ;; confusion in "\Verb[key-val]{foo[<--!}"
+                  "\\([^a-z@*\n\f{[]\\).*?"
                   ;; Give an escape char at the end of the verbatim
                   ;; construct punctuation syntax.  Prevents wrong
                   ;; fontification of stuff like "\verb|foo\|".




reply via email to

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