emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 7854116 2/3: Issue a message on `C-x 1' when there'


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 7854116 2/3: Issue a message on `C-x 1' when there's nothing to do
Date: Sat, 17 Aug 2019 19:36:08 -0400 (EDT)

branch: master
commit 78541163c63794a80c101c0011e05e7ac65734b2
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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).
---
 lisp/window.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/window.el b/lisp/window.el
index 5af66a0..2345f39 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]