bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14303: 24.3; Bug in comment-search-backward


From: Andreas Röhler
Subject: bug#14303: 24.3; Bug in comment-search-backward
Date: Fri, 17 May 2013 14:39:17 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

Am 17.05.2013 13:34, schrieb Leo Liu:
On 2013-05-17 19:14 +0800, Andreas Röhler wrote:
The succession of things doesn't look right yet.

if (eq comment-use-syntax nil)

re-search-backward based solution

which is very seldom. Grep shows 4 cases.

Otherwise syntax-ppss - , prog1 and nth 4 goto char nth 8 - or so.
Make sure wrong regexp isn't called then/no wrong matches.

Andreas

There is possible optimisation when 'end' is in a string.

Don't understand. "end" can't be in a string, if syntax-ppss is used.


 Other than
that do you have a case where my solution will fail?

Not just fail.
However most if this code looks redundant, useless employing of re-search-..., 
which will slow down Emacs when called from a program.




Leo







reply via email to

[Prev in Thread] Current Thread [Next in Thread]