GNU bug report logs -
#51830
29.0.50; tab-line-mode will override (setq-default tab-line-format "xxx")
Previous Next
Reported by: "Feng Shu" <tumashu <at> 163.com>
Date: Sun, 14 Nov 2021 06:06:01 UTC
Severity: normal
Tags: moreinfo
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
Message #13 received at 51830 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>> (setq tab-line-format "xxx")
>> (global-tab-line-mode 1)
>>
>> value "xxx" will lost.
>
> Yes, tab-line-mode resets the variable unconditionally:
>
> (define-minor-mode tab-line-mode
> "Toggle display of tab line in the windows displaying the current buffer."
> :lighter nil
> (setq tab-line-format (when tab-line-mode '(:eval (tab-line-format)))))
>
> Perhaps that should be done only when the variable's value is nil?
This needs also to keep the original value while disabling the mode.
Do you think this should be installed in Emacs 28?
[tab-line-mode.patch (text/x-diff, inline)]
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 5affae7913..110c6e9696 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -893,7 +893,14 @@ tab-line-context-menu
(define-minor-mode tab-line-mode
"Toggle display of tab line in the windows displaying the current buffer."
:lighter nil
- (setq tab-line-format (when tab-line-mode '(:eval (tab-line-format)))))
+ (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))
+ ;; Reset only values set by this mode
+ (when (equal tab-line-format default-value)
+ (setq tab-line-format nil)))))
(defcustom tab-line-exclude-modes
'(completion-list-mode)
This bug report was last modified 3 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.