GNU bug report logs -
#35140
12.1; Scan errors in doctex mode with ^^A-comments after braces
Previous Next
Reported by: Markus Kohm <komascript <at> gmx.info>
Date: Thu, 4 Apr 2019 12:38:02 UTC
Severity: normal
Found in version 12.1
Done: Ikumi Keita <ikumi <at> ikumi.que.jp>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hello Stefan, thanks for your response.
>>>>> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> In which operation does the "fails scanning for balanced {...} pairs"
> happen?
That's described in the example file test.dtx provided in the original
post by Markus; double-clicking by mouse:
--- test.dtx ---
% \begin{macro}{\test}^^A This is an official dtx-comment
% This does not work. Try to double-click to the closing brace before the
% comment and you will get: |Scan error: "Unbalanced parantheses", 22, 22|
% \end{macro}
%
% \begin{macro}{\test}%^^A This is a workaround for an official dtx-comment
% This does work, but the \% after the closing brace is not wanted.
% \end{macro}
% \endinput
% Local Variables:
% mode: doctex
% TeX-master: t
% End:
--- end of file ---
> I'm not sufficiently informed about DocTeX to know what's the right
> thing to do here. Changing the code so it only changes the face but
> without messing with syntax tables would definitely be simpler.
Agreed.
> But one thing catches my attention. If having the `}` marked as an
> end-of-comment "fails scanning for balanced {...} pairs" with the
> current setup, wouldn't the same kind of problem appear with
> # \begin{macro}^^A Funny, eh? (
> if the `^^A.*` part isn't marked in the syntax as separate?
I'm not sure I understand what you are worring about. Could you
ellaborate it?
> PS: It would be nicer if AUCTeX could just use the tex-mode.el code
> rather the copy&paste it.
I think that we can do that for `font-latex-doctex-^^A' and
`doctex-font-lock-^^A'. I guess AUCTeX needed separate function because
of compatibility for older emacsen including xemacs.
On the other hand, AUCTeX still needs its own function
`font-latex-doctex-syntactic-face-function' different from
`doctex-font-lock-syntactic-face-function' because we use different
faces for its return value.
Regards,
Ikumi Keita
This bug report was last modified 3 years and 138 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.