diff options
| author | Juri Linkov | 2018-12-21 01:41:25 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-12-21 01:41:25 +0200 |
| commit | 157ada833f36b9919be44ad4ecbae6d94c808dec (patch) | |
| tree | bb75cb834bea9b80124e7313dd6b85347f04f08b /lisp | |
| parent | 3f36651c6470bab951f12f486eb4928235f1ba50 (diff) | |
| download | emacs-157ada833f36b9919be44ad4ecbae6d94c808dec.tar.gz emacs-157ada833f36b9919be44ad4ecbae6d94c808dec.zip | |
* lisp/windmove.el (windmove-delete-in-direction): Change prefix arg C-u
to kill the buffer. Add prefix arg M-0 to delete the selected window.
(Bug#32790)
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/windmove.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/windmove.el b/lisp/windmove.el index c16c12444a0..75b9e0cf599 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -684,7 +684,8 @@ Default value of MODIFIERS is `shift-meta'." | |||
| 684 | 684 | ||
| 685 | (defun windmove-delete-in-direction (dir &optional arg) | 685 | (defun windmove-delete-in-direction (dir &optional arg) |
| 686 | "Delete the window at direction DIR. | 686 | "Delete the window at direction DIR. |
| 687 | If prefix ARG is `C-u', delete the selected window and | 687 | If prefix ARG is `\\[universal-argument]', also kill the buffer in that window. |
| 688 | With `M-0' prefix, delete the selected window and | ||
| 688 | select the window at direction DIR. | 689 | select the window at direction DIR. |
| 689 | When `windmove-wrap-around' is non-nil, takes the window | 690 | When `windmove-wrap-around' is non-nil, takes the window |
| 690 | from the opposite side of the frame." | 691 | from the opposite side of the frame." |
| @@ -693,7 +694,9 @@ from the opposite side of the frame." | |||
| 693 | (cond ((null other-window) | 694 | (cond ((null other-window) |
| 694 | (user-error "No window %s from selected window" dir)) | 695 | (user-error "No window %s from selected window" dir)) |
| 695 | (t | 696 | (t |
| 696 | (if (not (consp arg)) | 697 | (when (equal arg '(4)) |
| 698 | (kill-buffer (window-buffer other-window))) | ||
| 699 | (if (not (equal arg 0)) | ||
| 697 | (delete-window other-window) | 700 | (delete-window other-window) |
| 698 | (delete-window (selected-window)) | 701 | (delete-window (selected-window)) |
| 699 | (select-window other-window)))))) | 702 | (select-window other-window)))))) |