help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: face-remap-add-relative versus set-face-attribute


From: goncholden
Subject: Re: face-remap-add-relative versus set-face-attribute
Date: Sun, 13 Feb 2022 02:26:00 +0000

------- Original Message -------
On Sunday, February 13th, 2022 at 2:12 AM, goncholden 
<goncholden@protonmail.com> wrote:
> ------- Original Message -------
> On Sunday, February 13th, 2022 at 12:59 AM, Emanuel Berg via Users list for 
> the GNU Emacs text editor help-gnu-emacs@gnu.org wrote:
> > goncholden via Users list for the GNU Emacs text editor wrote:
> >
> > > What is superior? Using (face-remap-add-relative 'default :weight 'bold)
> > > or using (set-face-attribute 'font-lock-comment-face nil :weight normal) ?
> > They don't do the same thing ... But the second is good, except I don't
> > think one needs to `quote' font-lock-comment-face.
>
> face-remap-add-relative could be buffer local. Would one prefer buffer local 
> for customising
> comments?
>
> > Don't forget about font-lock-comment-delimiter-face BTW ...
>
> > And try this ...
>
> > (defun set-all-faces (fg &optional bg weight)
> > (let ((backg (or bg "black"))
> > (wght (or weight 'normal))
> > (faces) )
> > (mapatoms (lambda (s)
> > (when (facep s)
> > (push (symbol-name s) faces) )))
> > (dolist (f faces)
> > (set-face-attribute (intern f) nil
> > :foreground fg)
> > :background backg
> > :weight wght
> > :italic nil) ))
>
> > (set-all-faces "red")

What is the use of set-all-faces, getting perplexed with it.





reply via email to

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