From: Eli Zaretskii Date: Mon, 9 Oct 2000 16:05:35 +0000 (+0000) Subject: (IT_set_frame_parameters): Don't initialize Lisp_Object X-Git-Tag: emacs-pretest-21.0.90~1003 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1e21fe48c0731afa2b0416d0d61a59ded1e373bd;p=emacs.git (IT_set_frame_parameters): Don't initialize Lisp_Object variables. If ALIST includes foreground-color or background-color, change also the colors of the default face for this frame. --- diff --git a/src/ChangeLog b/src/ChangeLog index 75c54578531..65b8e4f988b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2000-10-09 Eli Zaretskii + + * msdos.c (IT_set_frame_parameters): Don't initialize Lisp_Object + variables. If ALISt includes foreground-color or + background-color, change also the colors of the default face for + this frame. + 2000-10-08 Eli Zaretskii * msdos.c (top-level) : Make diff --git a/src/msdos.c b/src/msdos.c index 9939cc5fe7a..0797c7607a0 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -2331,8 +2331,10 @@ IT_set_frame_parameters (f, alist) for (i = 0; i < j; i++) { - Lisp_Object prop = parms[i]; - Lisp_Object val = values[i]; + Lisp_Object prop, val; + + prop = parms[i]; + val = values[i]; if (EQ (prop, Qreverse)) reverse = EQ (val, Qt); @@ -2344,8 +2346,12 @@ IT_set_frame_parameters (f, alist) /* Now process the alist elements in reverse of specified order. */ for (i--; i >= 0; i--) { - Lisp_Object prop = parms[i]; - Lisp_Object val = values[i]; + extern Lisp_Object Qdefault, QCforeground, QCbackground; + Lisp_Object prop, val; + Lisp_Object frame; + + prop = parms[i]; + val = values[i]; if (EQ (prop, Qforeground_color)) { @@ -2356,12 +2362,21 @@ IT_set_frame_parameters (f, alist) && new_color != FACE_TTY_DEFAULT_FG_COLOR && new_color != FACE_TTY_DEFAULT_BG_COLOR) { + /* Make sure the foreground of the default face for this + frame is changed as well. */ + XSETFRAME (frame, f); if (reverse) - /* FIXME: should the fore-/background of the default - face change here as well? */ - FRAME_BACKGROUND_PIXEL (f) = new_color; + { + FRAME_BACKGROUND_PIXEL (f) = new_color; + Finternal_set_lisp_face_attribute (Qdefault, QCbackground, + val, frame); + } else - FRAME_FOREGROUND_PIXEL (f) = new_color; + { + FRAME_FOREGROUND_PIXEL (f) = new_color; + Finternal_set_lisp_face_attribute (Qdefault, QCforeground, + val, frame); + } redraw = 1; fg_set = 1; if (termscript) @@ -2377,10 +2392,21 @@ IT_set_frame_parameters (f, alist) && new_color != FACE_TTY_DEFAULT_FG_COLOR && new_color != FACE_TTY_DEFAULT_BG_COLOR) { + /* Make sure the background of the default face for this + frame is changed as well. */ + XSETFRAME (frame, f); if (reverse) - FRAME_FOREGROUND_PIXEL (f) = new_color; + { + FRAME_FOREGROUND_PIXEL (f) = new_color; + Finternal_set_lisp_face_attribute (Qdefault, QCforeground, + val, frame); + } else - FRAME_BACKGROUND_PIXEL (f) = new_color; + { + FRAME_BACKGROUND_PIXEL (f) = new_color; + Finternal_set_lisp_face_attribute (Qdefault, QCbackground, + val, frame); + } redraw = 1; bg_set = 1; if (termscript) @@ -2408,14 +2434,22 @@ IT_set_frame_parameters (f, alist) the current frame colors. */ if (reverse && !was_reverse) { + Lisp_Object frame; + if (!fg_set) { FRAME_BACKGROUND_PIXEL (f) = orig_fg; + XSETFRAME (frame, f); + Finternal_set_lisp_face_attribute (Qdefault, QCbackground, + tty_color_name (orig_fg), frame); redraw = 1; } if (!bg_set) { FRAME_FOREGROUND_PIXEL (f) = orig_bg; + XSETFRAME (frame, f); + Finternal_set_lisp_face_attribute (Qdefault, QCforeground, + tty_color_name (orig_bg), frame); redraw = 1; } }