# HG changeset patch # User Richard M. Stallman # Date 743762074 0 # Node ID a39dcf68a29c91d9ae8b710958df0c40b2e15a35 # Parent b5014da888a8036c28f1ec69ce93f33f9924ad71 (frame-notice-user-settings): Don't reapply a parm whose value is ot changed (as far as we know) since frame-initialize. diff -r b5014da888a8 -r a39dcf68a29c lisp/frame.el --- 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)