Commit 3f2f8c83 authored by Richard M. Stallman's avatar Richard M. Stallman

(frame-notice-user-settings): Don't reapply a parm

whose value is ot changed (as far as we know) since frame-initialize.
parent a9c00105
......@@ -81,6 +81,9 @@ These supersede the values given in `default-frame-alist'.")
;;; 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 @@ These supersede the values given in `default-frame-alist'.")
;; 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 @@ These supersede the values given in `default-frame-alist'.")
;; 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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment