Hello, On Sat 02 Aug 2025 at 08:03am GMT, Ihor Radchenko wrote:
> Sean Whitton <spwhit...@spwhitton.name> writes: > >> the best I can come up with is >> >> (defface org-hide >> '((((background light) (type ns)) (:foreground "white")) >> (((background light) (type w32)) (:foreground "white")) >> (((background dark) (type ns)) (:foreground "black")) >> (((background dark) (type w32)) (:foreground "black")) >> (((background light)) (:foreground "white" :inherit fixed-pitch)) >> (((background light)) (:foreground "white" :inherit fixed-pitch))) >> "Face used to hide leading stars in headlines. >> The foreground color of this face should be equal to the background >> color of the frame." >> :group 'org-faces) >> >> which is not good code. Is there any alternative? > > (defface org-hide > (mapcar > (pcase-lambda (`(,term ,bg)) > `(((background ,bg) (type ,term)) > (:foreground ,(pcase bg ('light "white") ('dark "black")) > ,@(when term '(:inherit fixed-pitch))))) > (let (args) > (dolist (term '(ns w32 nil) args) > (dolist (bg '(light dark)) > (push (list term bg) args))))) Ah, right, it's evaluated. Thanks, I'll prepare a new patch at some point. -- Sean Whitton