summaryrefslogtreecommitdiff
path: root/lisp/window.el
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-08-17 16:31:55 -0700
committerLars Ingebrigtsen <larsi@gnus.org>2019-08-17 16:36:00 -0700
commit78541163c63794a80c101c0011e05e7ac65734b2 (patch)
treeaee8a8e5babf054708ad4e8d3c71eac519c7353f /lisp/window.el
parent669599b0f4b59029fd977609be02f754a3b075eb (diff)
downloademacs-78541163c63794a80c101c0011e05e7ac65734b2.tar.gz
Issue a message on `C-x 1' when there's nothing to do
* lisp/window.el (delete-other-windows): Make `C-x 1' issue a message when there's no other windows to delete (bug#10999).
Diffstat (limited to 'lisp/window.el')
-rw-r--r--lisp/window.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el
index 5af66a036d1..2345f398e72 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4260,7 +4260,11 @@ any window whose `no-delete-other-windows' parameter is non-nil."
(throw 'done nil)))
;; If WINDOW is the main window of its frame do nothing.
- (unless (eq window main)
+ (if (eq window main)
+ ;; Give a message to the user if this has been called as a
+ ;; command.
+ (when (called-interactively-p 'interactive)
+ (message "No other windows to delete"))
(delete-other-windows-internal window main)
(window--check frame))
;; Always return nil.