changeset 27471:c64b8825af55

(delete-other-frames): New function. (toplevel): Bind it to C-x 5 1.
author Gerd Moellmann <gerd@gnu.org>
date Fri, 28 Jan 2000 13:22:46 +0000
parents 483c021bf376
children 881e4d39490d
files lisp/frame.el
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Fri Jan 28 12:53:52 2000 +0000
+++ b/lisp/frame.el	Fri Jan 28 13:22:46 2000 +0000
@@ -788,6 +788,15 @@
 should use `set-frame-height' instead."
   (set-frame-height (selected-frame) lines pretend))
 
+(defun delete-other-frames (&optional frame)
+  "Delete all frames except FRAME.
+FRAME nil or omitted means delete all frames except the selected frame."
+  (interactive)
+  (unless frame
+    (setq frame (selected-frame)))
+  (mapcar 'delete-frame (delq frame (frame-list))))
+
+
 (make-obsolete 'screen-height 'frame-height)
 (make-obsolete 'screen-width  'frame-width)
 (make-obsolete 'set-screen-width 'set-frame-width)
@@ -916,6 +925,7 @@
 ;;;; Key bindings
 
 (define-key ctl-x-5-map "2" 'make-frame-command)
+(define-key ctl-x-5-map "1" 'delete-other-frames)
 (define-key ctl-x-5-map "0" 'delete-frame)
 (define-key ctl-x-5-map "o" 'other-frame)