aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-08-02 05:39:48 +0000
committerRichard M. Stallman1994-08-02 05:39:48 +0000
commit5b66a32f60ce3484cea30469369926dcae9c2768 (patch)
tree33180e0999349a56fcec457df5d76e3dc71d0797
parent37fdc96f78ce8927a6f7d57b2da148d8b0b240f4 (diff)
downloademacs-5b66a32f60ce3484cea30469369926dcae9c2768.tar.gz
emacs-5b66a32f60ce3484cea30469369926dcae9c2768.zip
(frame-delete-all): New function.
(frame-notice-user-settings): Call it--with or without separate minibuffer frame.
-rw-r--r--lisp/frame.el25
1 files changed, 21 insertions, 4 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index a9ddc592818..0688b3098d5 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -228,13 +228,13 @@ These supersede the values given in `default-frame-alist'.")
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
@@ -298,6 +298,14 @@ These supersede the values given in `default-frame-alist'.")
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
@@ -325,6 +333,15 @@ These supersede the values given in `default-frame-alist'.")
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