From a926a0fab5e3a043eb30562367b33a0a582eab2a Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Wed, 29 Jul 1998 05:41:04 +0000 Subject: [PATCH] (mouse-delete-window): If the frame has just one window, bury the current buffer instead. --- lisp/mouse.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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." -- 2.39.2