diff options
| author | Roland McGrath | 1993-09-07 00:53:48 +0000 |
|---|---|---|
| committer | Roland McGrath | 1993-09-07 00:53:48 +0000 |
| commit | 68cd265f830104789138f1dec83dc0b6d81592bd (patch) | |
| tree | 82885277223598f181183f7f07fbfddcdd1086b8 | |
| parent | 5f517806dfb7f06d6ad0d97917768db7c7731aed (diff) | |
| download | emacs-68cd265f830104789138f1dec83dc0b6d81592bd.tar.gz emacs-68cd265f830104789138f1dec83dc0b6d81592bd.zip | |
(set-frame-configuration): Take new optional arg NODELETE; if non-nil,
don't delete any frames.
| -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 | |||
| 391 | (current-window-configuration frame)))) | 391 | (current-window-configuration frame)))) |
| 392 | (frame-list)))) | 392 | (frame-list)))) |
| 393 | 393 | ||
| 394 | (defun set-frame-configuration (configuration) | 394 | (defun set-frame-configuration (configuration &optional nodelete) |
| 395 | "Restore the frames to the state described by CONFIGURATION. | 395 | "Restore the frames to the state described by CONFIGURATION. |
| 396 | Each frame listed in CONFIGURATION has its position, size, window | 396 | Each frame listed in CONFIGURATION has its position, size, window |
| 397 | configuration, and other parameters set as specified in CONFIGURATION." | 397 | configuration, and other parameters set as specified in CONFIGURATION. |
| 398 | Unless optional second argument NODELETE is given and non-nil, deletes | ||
| 399 | all existing frames not listed in CONFIGURATION." | ||
| 398 | (or (frame-configuration-p configuration) | 400 | (or (frame-configuration-p configuration) |
| 399 | (signal 'wrong-type-argument | 401 | (signal 'wrong-type-argument |
| 400 | (list 'frame-configuration-p configuration))) | 402 | (list 'frame-configuration-p configuration))) |
| @@ -416,7 +418,8 @@ configuration, and other parameters set as specified in CONFIGURATION." | |||
| 416 | (set-window-configuration (nth 2 parameters))) | 418 | (set-window-configuration (nth 2 parameters))) |
| 417 | (setq frames-to-delete (cons frame frames-to-delete)))))) | 419 | (setq frames-to-delete (cons frame frames-to-delete)))))) |
| 418 | (frame-list)) | 420 | (frame-list)) |
| 419 | (mapcar 'delete-frame frames-to-delete))) | 421 | (or nodelete |
| 422 | (mapcar 'delete-frame frames-to-delete)))) | ||
| 420 | 423 | ||
| 421 | (defun frame-configuration-p (object) | 424 | (defun frame-configuration-p (object) |
| 422 | "Return non-nil if OBJECT seems to be a frame configuration. | 425 | "Return non-nil if OBJECT seems to be a frame configuration. |