[Top][All Lists]

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

Re: indistinguishable faces

From: Sam Steingold
Subject: Re: indistinguishable faces
Date: 07 Dec 2000 12:57:37 -0500
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.7

> * In message <address@hidden>
> * On the subject of "Re: indistinguishable faces"
> * Sent on Thu, 7 Dec 2000 19:28:14 +0200 (IST)
> * Honorable Eli Zaretskii <address@hidden> writes:
> On 7 Dec 2000, Sam Steingold wrote:
> > What about using this (in, say, faces.el):
> > 
> > (defvar font-add-color-alist '((bold . "red") (italic . "maroon")
> >                                (bold-italic . "magenta"))
> >   "*The alist of fonts and colors for `font-add-color'.")
> > 
> > (defun font-add-colors ()
> >   "Add `foreground-color' to some fonts using `font-add-color-alist'."
> >   (interactive)
> >   (let ((all-faces (apropos-internal "" 'facep))
> >         (bold (cdr (assq 'bold font-add-color-alist)))
> >         (italic (cdr (assq 'italic font-add-color-alist)))
> >         (bold-italic (cdr (assq 'bold-italic font-add-color-alist))))
> This will only do what you want for the faces that are defined when
> this function is invoked.  But it doesn't help for faces defined
> later, by packages Emacs loads on demand.

true.  this function is interactive for a reason - just call it after
loading something :-)
it also can be added to a load-hook or `eval-after-load'

An alternative user-level solution would be to redefine `defface'...

> In effect, what you wrote is a replacement for manually customizing
> each bold face to have a specific color, which you said was not
> enough, because other bold faces aren't changed.

there are quite a lot of faces that use bold, italic &c.
this is, of course, not a real solution, just a workaround.
The real solution would be something at the C level, with lisp interface

 '(((bold) . "red") ((bold italic) . "magenta")
   ((italic) . "maroon") ((italic underline) . "...")))

IMO, it is a bug when two different faces are displayed identically, and
something should be done about it.

Sam Steingold (http://www.podval.org/~sds)
Support Israel's right to defend herself! <http://www.i-charity.com/go/israel>
Read what the Arabs leaders say to their people on http://www.memri.org/
Flying is not dangerous; crashing is.

reply via email to

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