[Top][All Lists]

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

RE: overriding a face [was: 23.0.50; face-problems with multy-tty]

From: Drew Adams
Subject: RE: overriding a face [was: 23.0.50; face-problems with multy-tty]
Date: Mon, 1 Oct 2007 11:20:16 -0700

>     Maybe something like this would be a start?
>     (defmacro set-face (face spec &optional doc &rest args)
>       `(if (facep ',face)
>          (face-spec-set ',face ,spec)
>        (defface ,face ,spec ,(or doc "REPLACE ME") ,@args)))
> This seems like an incoherent combination of two different constructs,
> like a conditional choice between set and setq.  I don't think it is
> a good idea.

I don't understand. To me, it is only like `setq'. If the face exists, it
replaces its current definition (assuming `face-spec-set' does that);
otherwise, it creates it. How is this in any way like `set'?

This seems to work as I hoped. In any case, I'm looking for this
functionality (which you said you were in favor of), regardless of how it is

> We might want to make `set-face' an alias for `face-spec-set'.

What would be gained by that?

What I'm asking for is something that will _create or replace_ a face
definition, the same way `setq' creates a new variable or replaces an
existing variable's value.

reply via email to

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