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

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

bug#20732: in-string-p fails


From: Andreas Röhler
Subject: bug#20732: in-string-p fails
Date: Thu, 04 Jun 2015 13:50:38 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


Am 04.06.2015 um 11:58 schrieb Dmitry Gutov:
On 06/04/2015 12:27 PM, Andreas Röhler wrote:

(in-string-p) returns falsely nil, because it scans from "(defun "

See "** Font Lock displays portions of the buffer in incorrect faces." in etc/PROBLEMS.

     (let* ((erg (nth 8 (parse-partial-sexp (point-min) (point))))

This is clearly inadequate, because it discards the performance optimizations offered by `syntax-ppss'.

In question slow is better than false.

There is no way to know reliably if inside a string than scanning the whole buffer. All other is woodoo.

In result, it needs to consider these requests with care, re-use the result rather then salting la code with in-string-p calls. :)






reply via email to

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