Mercurial > emacs
changeset 22845:bd706438b50c
(mouse-delete-window): If the frame has just one window,
bury the current buffer instead.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 29 Jul 1998 05:41:04 +0000 |
parents | 1104a715c324 |
children | 18f446fb0b8d |
files | lisp/mouse.el |
diffstat | 1 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/mouse.el Wed Jul 29 03:21:32 1998 +0000 +++ b/lisp/mouse.el Wed Jul 29 05:41:04 1998 +0000 @@ -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."