emacs-diffs
[Top][All Lists]
Advanced

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

master fd3ab22a3ee 1/3: Inform user when tab-line-mode command makes no


From: Eli Zaretskii
Subject: master fd3ab22a3ee 1/3: Inform user when tab-line-mode command makes no change
Date: Sat, 18 May 2024 05:47:55 -0400 (EDT)

branch: master
commit fd3ab22a3eec5c3151b0791fc768e555b66e267c
Author: Jared Finder <jared@finder.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Inform user when tab-line-mode command makes no change
    
    * lisp/tab-line.el (tab-line-mode): Display message when command is
    run on already altered tab-line-format.
---
 lisp/tab-line.el | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 6898ba53e02..316c87fb3ad 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -1124,11 +1124,17 @@ However, return the correct mouse position list if 
EVENT is a
   (let ((default-value '(:eval (tab-line-format))))
     (if tab-line-mode
         ;; Preserve the existing tab-line set outside of this mode
-        (unless tab-line-format
-          (setq tab-line-format default-value))
+        (if (null tab-line-format)
+            (setq tab-line-format default-value)
+          (message
+           "tab-line-format set outside of tab-line-mode, currently `%S'"
+           tab-line-format))
       ;; Reset only values set by this mode
-      (when (equal tab-line-format default-value)
-        (setq tab-line-format nil)))))
+      (if (equal tab-line-format default-value)
+          (setq tab-line-format nil)
+        (message
+         "tab-line-format set outside of tab-line-mode, currently `%S'"
+         tab-line-format)))))
 
 (defcustom tab-line-exclude-modes
   '(completion-list-mode)



reply via email to

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