[Top][All Lists]

[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: Tassilo Horn
Subject: Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically
Date: Wed, 18 Mar 2015 08:17:45 +0100
User-agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>>>> Isn't font-lock-flush supposed to be cheap?
>>> If you use jit-lock-mode, yes.  If not, no.
>> Using it is the default.  Is there a good reason a user might have
>> disabled it for elisp buffers?
> There ideally shouldn't be a good reason, no.  It can be very useful
> while debugging font-lock-keywords, and things like that, but for
> "normal" use, jit-lock-mode should always be used in Elisp buffers.

Ok.  I just tried it anyway, and with jit-lock disabled,
`font-lock-flush' does nothing, e.g., the buffer portion you have
already scrolled through is still fontified as it has been before but
the yet "unknown" portions are and stay in the default face when
scrolling to them.  So it seems like in non-jit-locked buffers we'd
actually need to call f-l-flush followed by f-l-ensure.

But OTOH, when someone turns off jit-lock to debug fontification, she
might not like refreshed from the outside so that behavior could be seen
as justified there...

>> If no one objects, I'm going to install the patch below anytime soon
>> when the master branch bootstraps again without
>>   Eager macro-expansion failure: (void-function cl-every)
> Isn't this fixed already (at least, the cl-every I introduced has
> disappeared as a side-effect of a subsequent change)?

Yes, yes, its fixed.  I've committed and pushed my last patch (with some
fixes since the posted version) as 9fdc166.

If no one comes up with a (semi-)automated way of identifying
function-like macros, I'll go check the ~1300 macros in emacs manually.
For that, do we have clear criteria when we consider a macro
function-like?  Here's my list so far:

  - function-like:
    + has no arguments
    + just there to save a funcall (ad-get-advice-info-macro,
      Shouldn't those be defsubsts instead of macros?

  - not function-like:
    + is a control structure (when, when-let, cl-loop,...)
    + modifies places (push, pushnew, setf, ...)
    + defines something (def*, define-*)
    + sets up some environment (with-*, save-*)
    + error handling (ignore-errors, condition-case)
    + anaphora


reply via email to

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