aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii1999-08-10 10:13:05 +0000
committerEli Zaretskii1999-08-10 10:13:05 +0000
commit87f1940e4a94698be01b0b89d879183e962ee85e (patch)
tree8f0cbcdbc3f5fac0d297905f0b9d30b2e3e927b2
parent8bae7480b8bfe970f97e6afbb919ca41c28397f0 (diff)
downloademacs-87f1940e4a94698be01b0b89d879183e962ee85e.tar.gz
emacs-87f1940e4a94698be01b0b89d879183e962ee85e.zip
(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.
-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.")
559{ 559{
560 struct frame *f; 560 struct frame *f;
561 Lisp_Object frame; 561 Lisp_Object frame;
562 Lisp_Object tem;
562 563
563#ifdef MSDOS 564#ifdef MSDOS
564 if (selected_frame->output_method != output_msdos_raw) 565 if (selected_frame->output_method != output_msdos_raw)
@@ -576,7 +577,15 @@ Note that changing the size of one terminal frame automatically affects all.")
576 XSETFRAME (frame, f); 577 XSETFRAME (frame, f);
577 Fmodify_frame_parameters (frame, Vdefault_frame_alist); 578 Fmodify_frame_parameters (frame, Vdefault_frame_alist);
578 Fmodify_frame_parameters (frame, parms); 579 Fmodify_frame_parameters (frame, parms);
579 f->face_alist = selected_frame->face_alist; 580
581 /* Make the frame face alist be frame-specific, so that each
582 frame could change its face definitions independently. */
583 f->face_alist = Fcopy_alist (selected_frame->face_alist);
584 /* Simple Fcopy_alist isn't enough, because we need the contents of
585 the vectors which are the CDRs of associations in face_alist to
586 be copied as well. */
587 for (tem = f->face_alist; CONSP (tem); tem = XCDR (tem))
588 XCDR (XCAR (tem)) = Fcopy_sequence (XCDR (XCAR (tem)));
580 return frame; 589 return frame;
581} 590}
582 591
@@ -1952,11 +1961,15 @@ If FRAME is omitted, return information on the currently selected frame.")
1952 { 1961 {
1953 int fg = FRAME_FOREGROUND_PIXEL (f); 1962 int fg = FRAME_FOREGROUND_PIXEL (f);
1954 int bg = FRAME_BACKGROUND_PIXEL (f); 1963 int bg = FRAME_BACKGROUND_PIXEL (f);
1964 Lisp_Object qreverse = intern ("reverse");
1965 int rv =
1966 !NILP (Fassq (qreverse, alist))
1967 || !NILP (Fassq (qreverse, Vdefault_frame_alist));
1955 1968
1956 store_in_alist (&alist, intern ("foreground-color"), 1969 store_in_alist (&alist, intern ("foreground-color"),
1957 build_string (msdos_stdcolor_name (fg))); 1970 build_string (msdos_stdcolor_name (rv ? bg : fg)));
1958 store_in_alist (&alist, intern ("background-color"), 1971 store_in_alist (&alist, intern ("background-color"),
1959 build_string (msdos_stdcolor_name (bg))); 1972 build_string (msdos_stdcolor_name (rv ? fg : bg)));
1960 } 1973 }
1961 store_in_alist (&alist, intern ("font"), build_string ("ms-dos")); 1974 store_in_alist (&alist, intern ("font"), build_string ("ms-dos"));
1962#endif 1975#endif