From: Richard M. Stallman Date: Wed, 29 Jul 1998 05:41:04 +0000 (+0000) Subject: (mouse-delete-window): If the frame has just one window, X-Git-Tag: emacs-20.3~234 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a926a0fab5e3a043eb30562367b33a0a582eab2a;p=emacs.git (mouse-delete-window): If the frame has just one window, bury the current buffer instead. --- diff --git a/lisp/mouse.el b/lisp/mouse.el index 5d55b3dfd0e..1902db0a32d 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -123,10 +123,13 @@ (defun mouse-delete-window (click) "Delete the window you click on. -This must be bound to a mouse click." +If the frame has just one window, bury the current buffer instead. +This command must be bound to a mouse click." (interactive "e") - (mouse-minibuffer-check click) - (delete-window (posn-window (event-start click)))) + (if (one-window-p t) + (bury-buffer) + (mouse-minibuffer-check click) + (delete-window (posn-window (event-start click))))) (defun mouse-select-window (click) "Select the window clicked on; don't move point."