From: Gerd Moellmann Date: Fri, 28 Jan 2000 13:22:46 +0000 (+0000) Subject: (delete-other-frames): New function. X-Git-Tag: emacs-pretest-21.0.90~5224 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=154a757eb9028c8aaa67d2d892e105275686bf72;p=emacs.git (delete-other-frames): New function. (toplevel): Bind it to C-x 5 1. --- diff --git a/lisp/frame.el b/lisp/frame.el index c65b632a236..d6bc880a85e 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -788,6 +788,15 @@ This function is provided only for compatibility with Emacs 18; new code 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 @@ itself as a pre-command hook." ;;;; 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)