diff options
| author | Jim Blandy | 1993-07-04 02:20:59 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-07-04 02:20:59 +0000 |
| commit | 58bf6042169d93d1fbe96cab97be5c2999b63063 (patch) | |
| tree | d799e881b5472543e96589dd7fe1b5a47c783a9f | |
| parent | 1314409546d308c46c91d85b7e85c52c9dda6ef9 (diff) | |
| download | emacs-58bf6042169d93d1fbe96cab97be5c2999b63063.tar.gz emacs-58bf6042169d93d1fbe96cab97be5c2999b63063.zip | |
* frame.el (frame-remove-geometry-params): New function.
(frame-initialize): Call it, instead of writing it out.
| -rw-r--r-- | lisp/frame.el | 26 |
1 files changed, 18 insertions, 8 deletions
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'.") | |||
| 102 | ;; so that we won't reapply them in frame-notice-user-settings. | 102 | ;; so that we won't reapply them in frame-notice-user-settings. |
| 103 | ;; It would be wrong to reapply them then, | 103 | ;; It would be wrong to reapply them then, |
| 104 | ;; because that would override explicit user resizing. | 104 | ;; because that would override explicit user resizing. |
| 105 | ;; Remember that they may occur more than once. | 105 | (setq initial-frame-alist |
| 106 | (let ((tail initial-frame-alist)) | 106 | (frame-remove-geometry-params initial-frame-alist)) |
| 107 | (while (consp tail) | ||
| 108 | (if (and (consp (car tail)) | ||
| 109 | (memq (car (car tail)) '(height width top left))) | ||
| 110 | (setq initial-frame-alist | ||
| 111 | (delq tail initial-frame-alist))) | ||
| 112 | (setq tail (cdr tail)))) | ||
| 113 | ;; Handle `reverse' as a parameter. | 107 | ;; Handle `reverse' as a parameter. |
| 114 | (if (cdr (or (assq 'reverse initial-frame-alist) | 108 | (if (cdr (or (assq 'reverse initial-frame-alist) |
| 115 | (assq 'reverse default-frame-alist))) | 109 | (assq 'reverse default-frame-alist))) |
| @@ -316,6 +310,22 @@ additional frame parameters that Emacs recognizes for X window frames." | |||
| 316 | (function (lambda (frame) | 310 | (function (lambda (frame) |
| 317 | (eq frame (window-frame (minibuffer-window frame))))))) | 311 | (eq frame (window-frame (minibuffer-window frame))))))) |
| 318 | 312 | ||
| 313 | (defun frame-remove-geometry-params (param-list) | ||
| 314 | "Return the parameter list PARAM-LIST, but with geometry specs removed. | ||
| 315 | This deletes all bindings in PARAM-LIST for `top', `left', `width', | ||
| 316 | and `height' parameters. | ||
| 317 | Emacs uses this to avoid overriding explicit moves and resizings from | ||
| 318 | the user during startup." | ||
| 319 | (setq param-list (cons nil param-list)) | ||
| 320 | (let ((tail param-list)) | ||
| 321 | (while (consp (cdr tail)) | ||
| 322 | (if (and (consp (car (cdr tail))) | ||
| 323 | (memq (car (car (cdr tail))) '(height width top left))) | ||
| 324 | (setcdr tail (cdr (cdr tail))) | ||
| 325 | (setq tail (cdr tail))))) | ||
| 326 | (cdr param-list)) | ||
| 327 | |||
| 328 | |||
| 319 | 329 | ||
| 320 | ;;;; Frame configurations | 330 | ;;;; Frame configurations |
| 321 | 331 | ||