[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Syntax classes of text in href
From: |
Al Haji-Ali |
Subject: |
Syntax classes of text in href |
Date: |
Wed, 11 Jan 2023 10:44:08 +0000 |
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
- Syntax classes of text in href,
Al Haji-Ali <=
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/11
- Re: Syntax classes of text in href, Al Haji-Ali, 2023/01/11
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/11
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/12
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/12
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/12
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/12
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/13
- Re: Syntax classes of text in href, Arash Esbati, 2023/01/13
- Re: Syntax classes of text in href, Ikumi Keita, 2023/01/13