summaryrefslogtreecommitdiff
path: root/src/frame.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>1999-08-10 10:13:05 +0000
committerEli Zaretskii <eliz@gnu.org>1999-08-10 10:13:05 +0000
commit87f1940e4a94698be01b0b89d879183e962ee85e (patch)
tree8f0cbcdbc3f5fac0d297905f0b9d30b2e3e927b2 /src/frame.c
parent8bae7480b8bfe970f97e6afbb919ca41c28397f0 (diff)
downloademacs-87f1940e4a94698be01b0b89d879183e962ee85e.tar.gz
(Fframe_parameters): Swap foreground and background
colors returned in frame parameters if the frame has reverse in its parameter alist. (Fmake_terminal_frame): Make a unique copy of face_alist for each frame.
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c
index 6c8f234a685..fc2a175305b 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -559,6 +559,7 @@ Note that changing the size of one terminal frame automatically affects all.")
{
struct frame *f;
Lisp_Object frame;
+ Lisp_Object tem;
#ifdef MSDOS
if (selected_frame->output_method != output_msdos_raw)
@@ -576,7 +577,15 @@ Note that changing the size of one terminal frame automatically affects all.")
XSETFRAME (frame, f);
Fmodify_frame_parameters (frame, Vdefault_frame_alist);
Fmodify_frame_parameters (frame, parms);
- f->face_alist = selected_frame->face_alist;
+
+ /* Make the frame face alist be frame-specific, so that each
+ frame could change its face definitions independently. */
+ f->face_alist = Fcopy_alist (selected_frame->face_alist);
+ /* Simple Fcopy_alist isn't enough, because we need the contents of
+ the vectors which are the CDRs of associations in face_alist to
+ be copied as well. */
+ for (tem = f->face_alist; CONSP (tem); tem = XCDR (tem))
+ XCDR (XCAR (tem)) = Fcopy_sequence (XCDR (XCAR (tem)));
return frame;
}
@@ -1952,11 +1961,15 @@ If FRAME is omitted, return information on the currently selected frame.")
{
int fg = FRAME_FOREGROUND_PIXEL (f);
int bg = FRAME_BACKGROUND_PIXEL (f);
+ Lisp_Object qreverse = intern ("reverse");
+ int rv =
+ !NILP (Fassq (qreverse, alist))
+ || !NILP (Fassq (qreverse, Vdefault_frame_alist));
store_in_alist (&alist, intern ("foreground-color"),
- build_string (msdos_stdcolor_name (fg)));
+ build_string (msdos_stdcolor_name (rv ? bg : fg)));
store_in_alist (&alist, intern ("background-color"),
- build_string (msdos_stdcolor_name (bg)));
+ build_string (msdos_stdcolor_name (rv ? fg : bg)));
}
store_in_alist (&alist, intern ("font"), build_string ("ms-dos"));
#endif