emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms d


From: Daniel Colascione
Subject: Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically
Date: Mon, 16 Mar 2015 00:10:27 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 03/16/2015 12:07 AM, Tassilo Horn wrote:
> Stefan Monnier <address@hidden> writes:
> 
>>> Finally, I'm positively surprised at how fast the update function is.
>>> I would have expected some lag, but haven't found any (even though I'm
>>> looking).
>>
>> Loading Elisp files should be fairly rare.  But there might be cases
>> where it can be done repeatedly, but if/when faced with such a situation
>> we should be able to handle it efficiently e.g. by checking the
>> load-history (make sure the file did include some definitions before we
>> bother to scan symbols and rebuild the regexp) since such "run-time
>> loading" probably won't define new functions.
> 
> Like so?

Instead of doing it this way, why not make a font-lock matcher that
looks at *every* initial sexp atom, calls intern-soft on it, and applies
a face that depends on properties of the found symbol? This way, we'd
update fontification not only after load, but also after eval-defun, and
it'd be easy to make a `declare'-form that provided for exceptions from
the general rule.

cc-mode uses a system like this for keywords, and I think it's what
Stefan was talking about earlier.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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