all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* customized default face doesn't work on new frames
@ 2003-01-20 18:30 Dave Love
  2003-01-22  9:59 ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Dave Love @ 2003-01-20 18:30 UTC (permalink / raw)


If you customize the default face, it doesn't take effect on
subsequently-created frames, which is surprising.  The code somewhat
suggests this is intentional, but I can't see why and the behaviour
simply seems wrong.

[I'm running up against this and other things trying to provide a
useful interface to customizing fontsets in Emacs 22, so would like to
know if there's any good reason for the status quo.]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: customized default face doesn't work on new frames
  2003-01-20 18:30 customized default face doesn't work on new frames Dave Love
@ 2003-01-22  9:59 ` Richard Stallman
  2003-01-22 12:33   ` Oliver Scholz
  2003-01-22 18:52   ` Dave Love
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Stallman @ 2003-01-22  9:59 UTC (permalink / raw)
  Cc: emacs-devel

    If you customize the default face, it doesn't take effect on
    subsequently-created frames, which is surprising.  The code somewhat
    suggests this is intentional, but I can't see why and the behaviour
    simply seems wrong.

I think that is a bug.  Where exactly does the code suggest this was
intentional?

I tried it just now, changing the background of `default' to purple,
and it did take affect for subsequently created frames--almost.  It
changed the background for text, but it did not work quite right in
setting the background for empty areas of the screen.  Is that what
you observed?

I have a suspicion that this relates to screen-gamma.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: customized default face doesn't work on new frames
  2003-01-22  9:59 ` Richard Stallman
@ 2003-01-22 12:33   ` Oliver Scholz
  2003-01-22 18:52   ` Dave Love
  1 sibling, 0 replies; 5+ messages in thread
From: Oliver Scholz @ 2003-01-22 12:33 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     If you customize the default face, it doesn't take effect on
>     subsequently-created frames, which is surprising.  The code somewhat
>     suggests this is intentional, but I can't see why and the behaviour
>     simply seems wrong.
>
> I think that is a bug.  Where exactly does the code suggest this was
> intentional?
>
> I tried it just now, changing the background of `default' to purple,
> and it did take affect for subsequently created frames--almost.

The behaviour is different for different face attributes. For example
changing the height of the font is not propagated to new frames.

The same is true for the lisp functions:


Work for new frames:

(set-face-attribute 'default nil :foreground "red")
(set-face-attribute 'default nil :background "cyan")


Don't work for new frames:

(set-face-attribute 'default nil :height 240)
(set-face-attribute 'default nil :family "times")

    Oliver
-- 
Oliver Scholz               3 Pluviôse an 211 de la Révolution
Taunusstr. 25               Liberté, Egalité, Fraternité!
60329 Frankfurt a. M.       http://www.jungdemokratenhessen.de
Tel. (069) 97 40 99 42      http://www.jdjl.org

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: customized default face doesn't work on new frames
  2003-01-22  9:59 ` Richard Stallman
  2003-01-22 12:33   ` Oliver Scholz
@ 2003-01-22 18:52   ` Dave Love
  2003-01-24  5:43     ` Richard Stallman
  1 sibling, 1 reply; 5+ messages in thread
From: Dave Love @ 2003-01-22 18:52 UTC (permalink / raw)
  Cc: emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     If you customize the default face, it doesn't take effect on
>     subsequently-created frames, which is surprising.  The code somewhat
>     suggests this is intentional, but I can't see why and the behaviour
>     simply seems wrong.
> 
> I think that is a bug.  Where exactly does the code suggest this was
> intentional?

Sorry, I should have written ``customize the _font of_ the default
face''.

`face-set-after-frame-default' makes a special case of `(equal face
'default)'.

> I tried it just now, changing the background of `default' to purple,
> and it did take affect for subsequently created frames--almost.  It
> changed the background for text, but it did not work quite right in
> setting the background for empty areas of the screen.  Is that what
> you observed?

No, I was only interested in the font.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: customized default face doesn't work on new frames
  2003-01-22 18:52   ` Dave Love
@ 2003-01-24  5:43     ` Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2003-01-24  5:43 UTC (permalink / raw)
  Cc: emacs-devel

    `face-set-after-frame-default' makes a special case of `(equal face
    'default)'.

I think the reason for this is that the default face works a different
way.  Setting the attributes of the default face alters frame parameters,
and those frame parameters are supposed to affect other frames.

The code that alters frame parameters when you change the default
face seems to be in Finternal_set_lisp_face_attribute in xfaces.c.
Can someone debug why it doesn't work?

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-01-24  5:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-20 18:30 customized default face doesn't work on new frames Dave Love
2003-01-22  9:59 ` Richard Stallman
2003-01-22 12:33   ` Oliver Scholz
2003-01-22 18:52   ` Dave Love
2003-01-24  5:43     ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.