]> git.eshelyaron.com Git - emacs.git/commitdiff
Inform user when tab-line-mode command makes no change
authorJared Finder <jared@finder.org>
Mon, 13 May 2024 03:35:50 +0000 (20:35 -0700)
committerEshel Yaron <me@eshelyaron.com>
Sat, 18 May 2024 18:54:50 +0000 (20:54 +0200)
* lisp/tab-line.el (tab-line-mode): Display message when command is
run on already altered tab-line-format.

(cherry picked from commit fd3ab22a3eec5c3151b0791fc768e555b66e267c)

lisp/tab-line.el

index 6898ba53e02b2375a88eeea39aee7b867f658fcf..316c87fb3ade5f1bdb8e96bf2e1233d77b533ffe 100644 (file)
@@ -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)