From: Jim Blandy Date: Sun, 4 Jul 1993 02:20:59 +0000 (+0000) Subject: * frame.el (frame-remove-geometry-params): New function. X-Git-Tag: emacs-19.34~11880 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=58bf6042169d93d1fbe96cab97be5c2999b63063;p=emacs.git * frame.el (frame-remove-geometry-params): New function. (frame-initialize): Call it, instead of writing it out. --- diff --git a/lisp/frame.el b/lisp/frame.el index a9385ff9c6c..094e1419181 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -102,14 +102,8 @@ These supersede the values given in `default-frame-alist'.") ;; so that we won't reapply them in frame-notice-user-settings. ;; It would be wrong to reapply them then, ;; because that would override explicit user resizing. - ;; Remember that they may occur more than once. - (let ((tail initial-frame-alist)) - (while (consp tail) - (if (and (consp (car tail)) - (memq (car (car tail)) '(height width top left))) - (setq initial-frame-alist - (delq tail initial-frame-alist))) - (setq tail (cdr tail)))) + (setq initial-frame-alist + (frame-remove-geometry-params initial-frame-alist)) ;; Handle `reverse' as a parameter. (if (cdr (or (assq 'reverse initial-frame-alist) (assq 'reverse default-frame-alist))) @@ -316,6 +310,22 @@ additional frame parameters that Emacs recognizes for X window frames." (function (lambda (frame) (eq frame (window-frame (minibuffer-window frame))))))) +(defun frame-remove-geometry-params (param-list) + "Return the parameter list PARAM-LIST, but with geometry specs removed. +This deletes all bindings in PARAM-LIST for `top', `left', `width', +and `height' parameters. +Emacs uses this to avoid overriding explicit moves and resizings from +the user during startup." + (setq param-list (cons nil param-list)) + (let ((tail param-list)) + (while (consp (cdr tail)) + (if (and (consp (car (cdr tail))) + (memq (car (car (cdr tail))) '(height width top left))) + (setcdr tail (cdr (cdr tail))) + (setq tail (cdr tail))))) + (cdr param-list)) + + ;;;; Frame configurations