|
From: | Daniel Colascione |
Subject: | Re: [RFC PATCH] Per-window face support |
Date: | Thu, 7 Jun 2018 20:18:18 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 06/07/2018 07:57 PM, Stefan Monnier wrote:
I thought about that, but I worry that allowing arbitrary code to execute there would make any kind of caching invalidation or something much harder later. ISTM that lisp should always be able to compute whatever it wants ahead of time and smuggle the result into redisplay via the window parameter.This patch lets us actually vary faces on a window-by-window basis.Sounds good.+ 4. Conses of the form + (:filter (:window PARAMETER VALUE) FACE-SPECIFICATION), + which applies FACE-SPECIFICATION only if the + given face attributes are being evaluated in the context of a + window with a parameter named PARAMETER being EQ VALUE.Is there any chance we could allow running Elisp code there, i.e. allow
(:filter FUNCTION FACE-SPECIFICATION) or even just (:filter FUNCTION) where FUNCTION returns the FACE-SPECIFICATION (or nil, say).
If we went this route, I'd probably want to call it :eval.
DEFSYM (QCignore_defface, ":ignore-defface"); + /* Used for limiting character attributes to windows with specific + characteristics. */ + DEFSYM (Qwindow_kw, ":window"); + DEFSYM (Qfiltered_kw, ":filtered");Our convention is to use QC<foo> rather than Q<foo>_kw for ":foo", as can be seen above for :ignore-defface.
Gah, yes, of course.
[Prev in Thread] | Current Thread | [Next in Thread] |