]> git.eshelyaron.com Git - emacs.git/commitdiff
* frame.el (frame-remove-geometry-params): New function.
authorJim Blandy <jimb@redhat.com>
Sun, 4 Jul 1993 02:20:59 +0000 (02:20 +0000)
committerJim Blandy <jimb@redhat.com>
Sun, 4 Jul 1993 02:20:59 +0000 (02:20 +0000)
(frame-initialize): Call it, instead of writing it out.

lisp/frame.el

index a9385ff9c6ccb878d9771070950e59126fb7ee17..094e1419181a90849e0dae9b4188eb51e0bb22bb 100644 (file)
@@ -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))
+
+
 \f
 ;;;; Frame configurations