Mercurial > emacs
comparison lisp/frame.el @ 3971:6e7afc0a7fbc
* frame.el (frame-remove-geometry-params): New function.
(frame-initialize): Call it, instead of writing it out.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sun, 04 Jul 1993 02:20:59 +0000 |
parents | dcf86f82f2c8 |
children | a39dcf68a29c |
comparison
equal
deleted
inserted
replaced
3970:020fe391d5c1 | 3971:6e7afc0a7fbc |
---|---|
100 (new-frame initial-frame-alist))) | 100 (new-frame initial-frame-alist))) |
101 ;; Delete any specifications for window geometry parameters | 101 ;; Delete any specifications for window geometry parameters |
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))) |
116 (let ((params (frame-parameters frame-initial-frame))) | 110 (let ((params (frame-parameters frame-initial-frame))) |
117 (modify-frame-parameters | 111 (modify-frame-parameters |
313 (defun minibuffer-frame-list () | 307 (defun minibuffer-frame-list () |
314 "Return a list of all frames with their own minibuffers." | 308 "Return a list of all frames with their own minibuffers." |
315 (filtered-frame-list | 309 (filtered-frame-list |
316 (function (lambda (frame) | 310 (function (lambda (frame) |
317 (eq frame (window-frame (minibuffer-window frame))))))) | 311 (eq frame (window-frame (minibuffer-window frame))))))) |
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 | |
318 | 328 |
319 | 329 |
320 ;;;; Frame configurations | 330 ;;;; Frame configurations |
321 | 331 |
322 (defun current-frame-configuration () | 332 (defun current-frame-configuration () |