Hongyi Zhao <[email protected]> writes:
>> That's because the URL contains % and therefore looks like a "code
>> comment" to auctex, e.g.
>>
>> \some\latex{code}% And some comment bla bla bla bla...
>>
>> which would be properly filled as
>>
>> \some\latex{code}% And some comment bla bla bla
>> % ...bla...
>>
>> Of course, here it is wrong.
>>
>> I don't see what we could do here, unfortunately. But please file a bug
>> report (M-x TeX-submit-bug-report RET).
>
> Where will this submit the bug report?
To the GNU bug tracker, debbugs.gnu.org, assigned to the package auctex.
> But now, very strange, the problem disappeared.
Me neither. :-)
The reason is that once the auto-parser has kicked in and seen that you
are using the hyperref LaTeX package, it'll recognize the \href macro
(which is now also fontified correctly, e.g., not with
font-lock-comment-face including and after the first %) and know that
the % in the URL are not starting a comment.
To demonstrate: When you comment the \usepackage{hyperref} and hit `C-c
C-n' the problem will be back. Uncommenting it again then and hitting
`C-c C-n' makes it disappear.
Bye the way, you might want to add
(setq TeX-parse-self t)
(setq TeX-auto-save t)
to your auctex config as described in (info "(auctex) Top").
Bye,
Tassilo