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

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

bug#24749: Making sure syntax-propertize is called


From: Stefan Monnier
Subject: bug#24749: Making sure syntax-propertize is called
Date: Wed, 05 Jun 2019 09:32:21 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

> Relatedly, I just noticed that seemingly innocuous dabrev-expand
> (hippie-expand) trigger syntax-propertize for the entire buffer.

Probably because of a search with \< and such.  The fact that this
depends on the syntax-table text-property is a misfeature in most cases :-(

>> IIRC (and similarly, syntax-propertize wouldn't be applied to the
>> whole buffer if a match is found before EOB).
> In the multi-mode context some types of chunks might not be present in the
> buffer, and the rare ones are commonly not. So the search ends up at eob.

I was mere mentioning a detail of the behavior.  Indeed, if your search
fails then it will have checked to EOB.  So the behavior may depend on
details like the difference between:

    (re-search-forward "FOO\\|BAR" ...)
or
    (or (re-search-forward "FOO" ...)
        (re-search-forward "BAR" ...))


-- Stefan






reply via email to

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