changeset 27319:a896ba4a496b

(frame-notice-user-settings): New variable. (frame-notice-user-settings): Don't modify frame parameters if called a second time. (frame-notice-user-settings): Notice default-frame-parameters even for non-window frames.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 13 Jan 2000 14:46:19 +0000
parents 49a9d682a177
children 0d7491a370d2
files lisp/frame.el
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Thu Jan 13 13:55:49 2000 +0000
+++ b/lisp/frame.el	Thu Jan 13 14:46:19 2000 +0000
@@ -211,6 +211,9 @@
 		   (error
 		    "Can't create multiple frames without a window system"))))))))
 
+(defvar frame-notice-user-settings t
+  "Non-nil means function `frame-notice-user-settings' wasn't run yet.")
+
 ;;; startup.el calls this function after loading the user's init
 ;;; file.  Now default-frame-alist and initial-frame-alist contain
 ;;; information to which we must react; do what needs to be done.
@@ -233,6 +236,20 @@
   ;; window is the minibuffer.
   (let ((old-buffer (current-buffer)))
 
+    (when (and frame-notice-user-settings
+	       (null frame-initial-frame))
+      ;; This case happens when we don't have a window system.
+      (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 the initial frame is still around, apply initial-frame-alist
     ;; and default-frame-alist to it.
     (if (frame-live-p frame-initial-frame)
@@ -387,6 +404,7 @@
 
     ;; Make sure the initial frame can be GC'd if it is ever deleted.
     ;; Make sure frame-notice-user-settings does nothing if called twice.
+    (setq frame-notice-user-settings nil)
     (setq frame-initial-frame nil)))
 
 (defun make-initial-minibuffer-frame (display)