If I have the following text in a LaTeX buffer:
\href{ \cmd{test} }
The opening brace of href has syntax class 15 (for generic delimiter?), tested
by calling `(syntax-after (point))`. While the closing brace seems to have
syntax class 5 (for closed delimiter). Strangely, the opening brace of cmd has
the syntax class of 4 (opening delimiter) while the closing one has syntax
class of 15 again (for generic delimiter).
The result is that modes like `show-paren-mode` or `rainbow-delimiters` show
the braces as mismatched even though that's not the case. Calling `(scan-sexps
(point) 1)` on the opening brace of cmd also throws the error "Unbalanced
parenthesis".
In a simpler command like
\href{Test}
the syntax classes of both the opening and closing braces is generic delimiter.
Even though I would argue that they should be opening/closed delimiters, at
least there are no mismatched delimiters.
I can remove `\href` from `LaTeX-verbatim-macros-with-braces` and call
`font-latex-set-syntactic-keywords` to get the braces to match, but I am
wondering if there's a better solution.
Best regards,
-- Al