emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: creating new frame doesn't get faces right


From: John Paul Wallington
Subject: Re: creating new frame doesn't get faces right
Date: Mon, 26 May 2003 17:15:51 +0100

> emacs -q --no-site-file
> 
> (set-face-attribute 'mode-line nil
>                     :foreground "DarkSlateGrey" :background "Wheat")
> 
> The face is set correctly in the current frame. For some reason,
> however, M-x customize-face reports that "this face is unchanged from
> its standard setting". 
> 
> If I then create a new frame, the mode-line face gets :inverse-video
> turned on from somewhere, and loses its :box attribute. M-x
> customize-face still doesn't think the face has changed.
> 
> Similar problems occur with set-face-background. It seems that both
> this function and set-face-attribute only affect frames that exist
> when they are called. But according to their doc-strings, if changes
> are applied to all frames they should be applied to new frames as
> well. This is certainly what used to happen (up until less than one
> week ago).

Confirmed.  Although perhaps whether custom thinks the face is
unchanged is a separate issue ?

How about Richard's suggested fix (below) ?  It works here.
I'll install it if no-one yells (with a comment in xfns.c).


Index: lisp/faces.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v
retrieving revision 1.277
diff -u -r1.277 faces.el
--- lisp/faces.el       19 May 2003 14:46:06 -0000      1.277
+++ lisp/faces.el       26 May 2003 16:14:31 -0000
@@ -1657,8 +1657,7 @@
        (progn
          (x-handle-reverse-video frame parameters)
          (frame-set-background-mode frame)
-         ;; No need to call `face-set-after-frame-default'
-         ;; since x-create-frame does that.
+         (face-set-after-frame-default frame)
          (if (or (null frame-list) (null visibility-spec))
              (make-frame-visible frame)
            (modify-frame-parameters frame (list visibility-spec)))

Index: src/xfns.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/xfns.c,v
retrieving revision 1.582
diff -u -r1.582 xfns.c
--- src/xfns.c  25 May 2003 17:46:34 -0000      1.582
+++ src/xfns.c  26 May 2003 16:15:17 -0000
@@ -3316,12 +3316,6 @@
   FRAME_LINES (f) = 0;
   change_frame_size (f, height, width, 1, 0, 0);
 
-  /* Set up faces after all frame parameters are known.  This call
-     also merges in face attributes specified for new frames.  If we
-     don't do this, the `menu' face for instance won't have the right
-     colors, and the menu bar won't appear in the specified colors for
-     new frames.  */
-  call1 (Qface_set_after_frame_default, frame);
 
 #if defined (USE_X_TOOLKIT) || defined (USE_GTK)
   /* Create the menu bar.  */




reply via email to

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