GNU bug report logs - #15251
24.3.50; do-auto-fill "continues" comment from inside a string

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Tue, 3 Sep 2013 01:28:01 UTC

Severity: normal

Found in version 24.3.50

Fixed in version 24.4

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 15251 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 15251 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#15251: 24.3.50;
 do-auto-fill "continues" comment from inside a string
Date: Sun, 29 Sep 2013 18:16:29 +0300
Andreas Röhler <andreas.roehler <at> easy-emacs.de> writes:
> Reading the face for detecting basic things like comment is terrible.

It sure is. It can be justified for very hot functions, but otherwise
`syntax-ppss' does a better job in (more or less) constant time.

But that code was written in 2001, a few months before `syntax-ppss' was
introduced.

> What did the author smoke when writing this ;)

Let's ask him. :)

Stefan, can we consider `syntax-ppss' fast enough at this point?

It will mean re-implementing `comment-search-backward' in terms of it,
and removing most of the code in `comment-beginning' definition.

AFAICT, both of these functions are not particularly hot, and are called
once or twice per user action, at most.

`comment-search-backward' can also be made to respect
`comment-use-syntax' (and use its current definition if that var's value
is nil), but if comments don't have valid entries in the syntax table,
font-lock won't recognize them (or will it?), and then the dance with
face properties is not useful either.




This bug report was last modified 11 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.