diff options
author | Roland McGrath <roland@gnu.org> | 1993-09-07 00:53:48 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1993-09-07 00:53:48 +0000 |
commit | 73c7329b8c47fd47cef60db2d6e20a60f806ea0f (patch) | |
tree | be76062791cd5b3f3d669ccd1f93cf06ea1b5db8 /lisp/frame.el | |
parent | ace46dd13256370cef7968beb7605373da4d36ff (diff) | |
download | emacs-73c7329b8c47fd47cef60db2d6e20a60f806ea0f.tar.gz |
(set-frame-configuration): Take new optional arg NODELETE; if non-nil,
don't delete any frames.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r-- | lisp/frame.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/frame.el b/lisp/frame.el index ac4304dc09f..f3cbdbb9284 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -391,10 +391,12 @@ where (current-window-configuration frame)))) (frame-list)))) -(defun set-frame-configuration (configuration) +(defun set-frame-configuration (configuration &optional nodelete) "Restore the frames to the state described by CONFIGURATION. Each frame listed in CONFIGURATION has its position, size, window -configuration, and other parameters set as specified in CONFIGURATION." +configuration, and other parameters set as specified in CONFIGURATION. +Unless optional second argument NODELETE is given and non-nil, deletes +all existing frames not listed in CONFIGURATION." (or (frame-configuration-p configuration) (signal 'wrong-type-argument (list 'frame-configuration-p configuration))) @@ -416,7 +418,8 @@ configuration, and other parameters set as specified in CONFIGURATION." (set-window-configuration (nth 2 parameters))) (setq frames-to-delete (cons frame frames-to-delete)))))) (frame-list)) - (mapcar 'delete-frame frames-to-delete))) + (or nodelete + (mapcar 'delete-frame frames-to-delete)))) (defun frame-configuration-p (object) "Return non-nil if OBJECT seems to be a frame configuration. |