# HG changeset patch # User Jim Blandy # Date 741752459 0 # Node ID 6e7afc0a7fbc461551563556da060488a8406752 # Parent 020fe391d5c138fb4372fe3240a41675288c0392 * frame.el (frame-remove-geometry-params): New function. (frame-initialize): Call it, instead of writing it out. diff -r 020fe391d5c1 -r 6e7afc0a7fbc lisp/frame.el --- a/lisp/frame.el Sun Jul 04 01:53:24 1993 +0000 +++ b/lisp/frame.el Sun Jul 04 02:20:59 1993 +0000 @@ -102,14 +102,8 @@ ;; 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 @@ (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