Mercurial > emacs
changeset 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 | 960d9fb24788 |
children | 8b8835f1630a |
files | lisp/frame.el |
diffstat | 1 files changed, 21 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/frame.el Tue Aug 02 02:32:26 1994 +0000 +++ b/lisp/frame.el Tue Aug 02 05:39:48 1994 +0000 @@ -228,13 +228,13 @@ ;; when we first made the frame. (setq parms (cons '(reverse) (delq (assq 'reverse parms) parms))) (if (assq 'height frame-initial-geometry-arguments) - (setq parms (delq (assq 'height parms) parms))) + (setq parms (frame-delete-all 'height parms))) (if (assq 'width frame-initial-geometry-arguments) - (setq parms (delq (assq 'width parms) parms))) + (setq parms (frame-delete-all 'width parms))) (if (assq 'left frame-initial-geometry-arguments) - (setq parms (delq (assq 'left parms) parms))) + (setq parms (frame-delete-all 'left parms))) (if (assq 'top frame-initial-geometry-arguments) - (setq parms (delq (assq 'top parms) parms))) + (setq parms (frame-delete-all 'top parms))) (setq new (make-frame ;; Use the geometry args that created the existing @@ -298,6 +298,14 @@ (let (newparms allparms tail) (setq allparms (append initial-frame-alist default-frame-alist)) + (if (assq 'height frame-initial-geometry-arguments) + (setq allparms (frame-delete-all 'height allparms))) + (if (assq 'width frame-initial-geometry-arguments) + (setq allparms (frame-delete-all 'width allparms))) + (if (assq 'left frame-initial-geometry-arguments) + (setq allparms (frame-delete-all 'left allparms))) + (if (assq 'top frame-initial-geometry-arguments) + (setq allparms (frame-delete-all 'top allparms))) (setq tail allparms) ;; Find just the parms that have changed since we first ;; made this frame. Those are the ones actually set by @@ -325,6 +333,15 @@ ;; Make sure frame-notice-user-settings does nothing if called twice. (setq frame-initial-frame nil))) +;; Delete from ALIST all elements whose car is KEY. +;; Return the modified alist. +(defun frame-delete-all (key alist) + (let ((tail alist)) + (while tail + (if (eq (car (car tail)) key) + (setq alist (delq (car tail) alist))) + (setq tail (cdr tail))) + alist)) ;;;; Creation of additional frames, and other frame miscellanea