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

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

Re: copy-face seems to work only for current frame


From: Eli Zaretskii
Subject: Re: copy-face seems to work only for current frame
Date: 27 Jan 2004 11:13:45 +0200

> From: Klaus Zeitler <kzeitler+usenet@gsm-mailhost.de.lucent.com>
> Newsgroups: gnu.emacs.help
> Date: 27 Jan 2004 08:51:59 +0100
> 
> Since I didn't like woman-bold-face I tried to change the face by adding:
> (eval-after-load "woman"
>   '(copy-face 'font-lock-builtin-face 'woman-bold-face))
> 
> This works fine as long as I open a manual in the same frame. But when
> I open it (setting woman-use-own-frame to t) in a new frame, I have the old
> face back.
> I also played with the 3rd parameter of copy face (tried nil and t) but to
> no avail.

I think the above fails because it is evaluated after _loading_
woman.elc, and at that point, the new frame where the WoMan buffer is
to be displayed does not yet exist.  The new WoMan frame is created
only when woman.elc's code _runs_, not when it is _loaded_.  So
copy-face indeed copies the face definition into all the existing
frames, but the WoMan frame is created only afterwards.

> How can I copy a face so that it'll stay the same for all existing and new
> frames?

Why don't you simply customize woman-bold-face?  That's what one is
supposed to do in such cases, you know ;-)

Alternatively, if you want to get fancy, run your code from
`woman-pre-format-hook'.  The WoMan docs explicitly says that this
hook is intended for things like face customizations...





reply via email to

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