[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
overriding a face [was: 23.0.50; face-problems with multy-tty]
From: |
Drew Adams |
Subject: |
overriding a face [was: 23.0.50; face-problems with multy-tty] |
Date: |
Sun, 30 Sep 2007 16:53:43 -0700 |
> From: Richard Stallman Sent: Friday, September 14, 2007 12:05 AM
> Subject: Re: 23.0.50; face-problems with multy-tty
>
> > "something analogous to what `setq' does for `defvar' and
> > `defcustom'. Something, for instance, that a user can put in
> > .emacs to override a predefined `defface'.
>
> I am in favor of it.
Maybe something like this would be a start?
(defmacro set-face (face spec &optional doc &rest args)
"Set the spec for face symbol FACE to SPEC.
If FACE is a face, then FACE and SPEC are passed
to `face-spec-set'.
Otherwise, all arguments are passed to `defface'."
`(if (facep ',face)
(face-spec-set ',face ,spec)
(defface ,face ,spec ,(or doc "REPLACE ME") ,@args)))
Perhaps that's not entirely correct, but maybe it will stimulate someone who
knows about this sort of thing to correct it.
That seems to do what I was asking, in any case. The idea is that a user or
Lisp code could use (set-face face spec) to define a new face or to override
the definition of an existing face.
But maybe this would be taken care of by Richard's proposed change to
`face-spec-set'? (I don't fully understand that.)
- Re: 23.0.50; face-problems with multy-tty, (continued)
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/07
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/07
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/08
- Re: 23.0.50; face-problems with multy-tty, Tassilo Horn, 2007/09/08
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/13
- RE: 23.0.50; face-problems with multy-tty, Drew Adams, 2007/09/13
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/14
- overriding a face [was: 23.0.50; face-problems with multy-tty],
Drew Adams <=
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/16
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/18
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/23
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/23
- Re: 23.0.50; face-problems with multy-tty, Eli Zaretskii, 2007/09/24
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/24
- Re: 23.0.50; face-problems with multy-tty, Eli Zaretskii, 2007/09/24
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/26
- Re: 23.0.50; face-problems with multy-tty, Richard Stallman, 2007/09/25
- Re: 23.0.50; face-problems with multy-tty, Johan Bockgård, 2007/09/26