]> git.eshelyaron.com Git - emacs.git/commitdiff
Issue a message on `C-x 1' when there's nothing to do
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Aug 2019 23:31:55 +0000 (16:31 -0700)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 17 Aug 2019 23:36:00 +0000 (16:36 -0700)
* lisp/window.el (delete-other-windows): Make `C-x 1' issue a
message when there's no other windows to delete (bug#10999).

lisp/window.el

index 5af66a036d11f9d899a6c3cc86d5a8fe84d14861..2345f398e7240d06f63b3a9eaf1f5e80b60effec 100644 (file)
@@ -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.