Hi Arash,
> What do get with your patch when you eval this form:
>
> --8<---------------cut here---------------start------------->8---
> (mapcar
> (lambda (str)
> (with-temp-buffer
> (LaTeX-mode)
> (insert str)
> (char-to-string (char-before (TeX-find-macro-end-helper (point-min))))))
> '("\begin{enumerate}[a]"
> "\begin{enumerate}[(a)]"
> "\begin{enumerate}[a)]"
> "\begin{enumerate}[a{]}]"))
> --8<---------------cut here---------------end--------------->8---
I get the right answer ("]" "]" "]" "]"), but for the wrong reason:
evaluating
--8<---------------cut here---------------start------------->8---
(mapcar
(lambda (str)
(with-temp-buffer
(LaTeX-mode)
(insert str)
(char-to-string (char-before (1- (TeX-find-macro-end-helper
(point-min)))))))
'("\begin{enumerate}[a{]}]"))
--8<---------------cut here---------------end--------------->8---
yields ("{"), which shows that it's picking up the wrong "]".
I guess this case could be covered by adding "{" and "}" to the syntax
table. Can you imagine any further issues with that approach?
Thanks, best,
Paul
_______________________________________________
bug-auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-auctex