changeset 4305:a39dcf68a29c

(frame-notice-user-settings): Don't reapply a parm whose value is ot changed (as far as we know) since frame-initialize.
author Richard M. Stallman <rms@gnu.org>
date Tue, 27 Jul 1993 08:34:34 +0000
parents b5014da888a8
children 2e51ffb537a8
files lisp/frame.el
diffstat 1 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Tue Jul 27 08:33:44 1993 +0000
+++ b/lisp/frame.el	Tue Jul 27 08:34:34 1993 +0000
@@ -81,6 +81,9 @@
 ;;; If we create the initial frame, this is it.
 (defvar frame-initial-frame nil)
 
+;; Record the parameters used in frame-initialize to make the initial frame.
+(defvar frame-initial-frame-alist)
+
 ;;; startup.el calls this function before loading the user's init
 ;;; file - if there is no frame with a minibuffer open now, create
 ;;; one to display messages while loading the init file.
@@ -95,6 +98,8 @@
 	;; minibuffer spec.
 	(or (delq terminal-frame (minibuffer-frame-list))
 	    (progn
+	      (setq frame-initial-frame-alist
+		    (append initial-frame-alist default-frame-alist))
 	      (setq default-minibuffer-frame
 		    (setq frame-initial-frame
 			  (new-frame initial-frame-alist)))
@@ -228,9 +233,28 @@
 
 	  ;; Otherwise, we don't need all that rigamarole; just apply
 	  ;; the new parameters.
-	  (modify-frame-parameters frame-initial-frame
-				   (append initial-frame-alist
-					   default-frame-alist))))
+	  (let (newparms allparms tail)
+	    (setq allparms (append initial-frame-alist
+				   default-frame-alist))
+	    (setq tail allparms)
+	    ;; Find just the parms that have changed since we first
+	    ;; made this frame.  Those are the ones actually set by
+	    ;; the init file.  For those parms whose values we already knew
+	    ;; (such as those spec'd by command line options)
+	    ;; it is undesirable to specify the parm again
+	    ;; once the user has seen the frame and been able to alter it
+	    ;; manually.
+	    (while tail
+	      (let (newval oldval)
+		(setq oldval (cdr (assq (car (car tail))
+					frame-initial-frame-alist)))
+		(setq newval (cdr (assq (car (car tail)) allparms)))
+		(or (eq oldval newval)
+		    (setq newparms
+			  (cons (cons (car (car tail)) newval) newparms))))
+	      (setq tail (cdr tail)))
+	    (modify-frame-parameters frame-initial-frame
+				     (nreverse newparms)))))
 
     ;; Restore the original buffer.
     (set-buffer old-buffer)