branch: externals/tex-parens
commit 5d3992cae8e3a48bd4fade1e0624bd8928b7bac3
Author: Paul Nelson <[email protected]>
Commit: Paul Nelson <[email protected]>
fix subtle comment detection bug
For stuff like \email{whatever}, the part "{whatever}" is in verbatim
font, but we were just checking this on the first characters of the
delimiters. Checking it on the final characters seems to work. A bit
inelegant since it means that we ignore such macros, but don't see any
way around doing so without resorting to "non-local" parsing.
---
tex-parens.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tex-parens.el b/tex-parens.el
index d7bfb8944e..13ac67e143 100644
--- a/tex-parens.el
+++ b/tex-parens.el
@@ -293,7 +293,7 @@ then ignore comments; these are detected via
mode, then ignore it. If M-STR is a dollar delimiter that does
not demarcate math mode, then ignore it."
(or (and tp-ignore-comments
- (save-excursion (goto-char m-begin)
+ (save-excursion (goto-char (1- m-end))
(tp--comment)))
(and (equal m-str "''")
(save-excursion (goto-char m-begin)