[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master d3d9dc08: Disallow opening square brackets as verb delimiter
From: |
Arash Esbati |
Subject: |
master d3d9dc08: Disallow opening square brackets as verb delimiter |
Date: |
Fri, 8 Sep 2023 05:16:05 -0400 (EDT) |
branch: master
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 7617b5cc..8fc567e2 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\|".
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master d3d9dc08: Disallow opening square brackets as verb delimiter,
Arash Esbati <=