Mercurial > emacs
comparison lisp/frame.el @ 8424:af4e01d24892
(frame-delete-all): New function.
(frame-notice-user-settings): Call it--with or without separate
minibuffer frame.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 02 Aug 1994 05:39:48 +0000 |
parents | aa25c6ea397d |
children | 32880f6bd87a |
comparison
equal
deleted
inserted
replaced
8423:960d9fb24788 | 8424:af4e01d24892 |
---|---|
226 nil)) | 226 nil)) |
227 ;; Get rid of `reverse', because that was handled | 227 ;; Get rid of `reverse', because that was handled |
228 ;; when we first made the frame. | 228 ;; when we first made the frame. |
229 (setq parms (cons '(reverse) (delq (assq 'reverse parms) parms))) | 229 (setq parms (cons '(reverse) (delq (assq 'reverse parms) parms))) |
230 (if (assq 'height frame-initial-geometry-arguments) | 230 (if (assq 'height frame-initial-geometry-arguments) |
231 (setq parms (delq (assq 'height parms) parms))) | 231 (setq parms (frame-delete-all 'height parms))) |
232 (if (assq 'width frame-initial-geometry-arguments) | 232 (if (assq 'width frame-initial-geometry-arguments) |
233 (setq parms (delq (assq 'width parms) parms))) | 233 (setq parms (frame-delete-all 'width parms))) |
234 (if (assq 'left frame-initial-geometry-arguments) | 234 (if (assq 'left frame-initial-geometry-arguments) |
235 (setq parms (delq (assq 'left parms) parms))) | 235 (setq parms (frame-delete-all 'left parms))) |
236 (if (assq 'top frame-initial-geometry-arguments) | 236 (if (assq 'top frame-initial-geometry-arguments) |
237 (setq parms (delq (assq 'top parms) parms))) | 237 (setq parms (frame-delete-all 'top parms))) |
238 (setq new | 238 (setq new |
239 (make-frame | 239 (make-frame |
240 ;; Use the geometry args that created the existing | 240 ;; Use the geometry args that created the existing |
241 ;; frame, rather than the parms we get for it. | 241 ;; frame, rather than the parms we get for it. |
242 (append frame-initial-geometry-arguments parms))) | 242 (append frame-initial-geometry-arguments parms))) |
296 ;; Otherwise, we don't need all that rigamarole; just apply | 296 ;; Otherwise, we don't need all that rigamarole; just apply |
297 ;; the new parameters. | 297 ;; the new parameters. |
298 (let (newparms allparms tail) | 298 (let (newparms allparms tail) |
299 (setq allparms (append initial-frame-alist | 299 (setq allparms (append initial-frame-alist |
300 default-frame-alist)) | 300 default-frame-alist)) |
301 (if (assq 'height frame-initial-geometry-arguments) | |
302 (setq allparms (frame-delete-all 'height allparms))) | |
303 (if (assq 'width frame-initial-geometry-arguments) | |
304 (setq allparms (frame-delete-all 'width allparms))) | |
305 (if (assq 'left frame-initial-geometry-arguments) | |
306 (setq allparms (frame-delete-all 'left allparms))) | |
307 (if (assq 'top frame-initial-geometry-arguments) | |
308 (setq allparms (frame-delete-all 'top allparms))) | |
301 (setq tail allparms) | 309 (setq tail allparms) |
302 ;; Find just the parms that have changed since we first | 310 ;; Find just the parms that have changed since we first |
303 ;; made this frame. Those are the ones actually set by | 311 ;; made this frame. Those are the ones actually set by |
304 ;; the init file. For those parms whose values we already knew | 312 ;; the init file. For those parms whose values we already knew |
305 ;; (such as those spec'd by command line options) | 313 ;; (such as those spec'd by command line options) |
323 | 331 |
324 ;; Make sure the initial frame can be GC'd if it is ever deleted. | 332 ;; Make sure the initial frame can be GC'd if it is ever deleted. |
325 ;; Make sure frame-notice-user-settings does nothing if called twice. | 333 ;; Make sure frame-notice-user-settings does nothing if called twice. |
326 (setq frame-initial-frame nil))) | 334 (setq frame-initial-frame nil))) |
327 | 335 |
336 ;; Delete from ALIST all elements whose car is KEY. | |
337 ;; Return the modified alist. | |
338 (defun frame-delete-all (key alist) | |
339 (let ((tail alist)) | |
340 (while tail | |
341 (if (eq (car (car tail)) key) | |
342 (setq alist (delq (car tail) alist))) | |
343 (setq tail (cdr tail))) | |
344 alist)) | |
328 | 345 |
329 ;;;; Creation of additional frames, and other frame miscellanea | 346 ;;;; Creation of additional frames, and other frame miscellanea |
330 | 347 |
331 ;;; Return some frame other than the current frame, creating one if | 348 ;;; Return some frame other than the current frame, creating one if |
332 ;;; necessary. Note that the minibuffer frame, if separate, is not | 349 ;;; necessary. Note that the minibuffer frame, if separate, is not |