changeset 33009:e7cb49941cb1

(frame-notice-user-settings): Don't apply default-frame-alist and initial-frame-alist to MS-DOS frames. Call tty-handle-reverse-video, frame-set-background-mode, and face-set-after-frame-default for non-MS-DOS frames.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 28 Oct 2000 17:18:21 +0000
parents c30c394884b8
children 95f07ba644ef
files lisp/frame.el
diffstat 1 files changed, 23 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Sat Oct 28 17:17:42 2000 +0000
+++ b/lisp/frame.el	Sat Oct 28 17:18:21 2000 +0000
@@ -252,17 +252,35 @@
 
     (when (and frame-notice-user-settings
 	       (null frame-initial-frame))
-      ;; This case happens when we don't have a window system.
+      ;; This case happens when we don't have a window system, and
+      ;; also for MS-DOS frames.
       (let ((parms (frame-parameters frame-initial-frame)))
 	;; Don't change the frame names.
 	(setq parms (delq (assq 'name parms) parms))
 	;; Can't modify the minibuffer parameter, so don't try.
 	(setq parms (delq (assq 'minibuffer parms) parms))
 	(modify-frame-parameters nil
-				 (append initial-frame-alist
-					 default-frame-alist
-					 parms
-					 nil))))
+				 (if (null window-system)
+				     (append initial-frame-alist
+					     default-frame-alist
+					     parms
+					     nil)
+				   ;; initial-frame-alist and
+				   ;; default-frame-alist were already
+				   ;; applied in pc-win.el.
+				   parms))
+	(if (null window-system) ;; MS-DOS does this differently in pc-win.el
+	    (let ((newparms (frame-parameters))
+		  (frame (selected-frame)))
+	      (tty-handle-reverse-video frame newparms)
+	      ;; If we changed the background color, we need to update
+	      ;; the background-mode parameter, and maybe some faces,
+	      ;; too.
+	      (when (assq 'background-color newparms)
+		(unless (or (assq 'background-mode initial-frame-alist)
+			    (assq 'background-mode default-frame-alist))
+		  (frame-set-background-mode frame))
+		(face-set-after-frame-default frame))))))
 
     ;; If the initial frame is still around, apply initial-frame-alist
     ;; and default-frame-alist to it.