From: Juri Linkov Date: Sun, 14 Nov 2021 18:35:42 +0000 (+0200) Subject: * lisp/tab-line.el (tab-line-mode): Preserve existing value of tab-line-format X-Git-Tag: emacs-29.0.90~2852^2~283 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e6df5a32d07564115488643206396ba0c28decf2;p=emacs.git * lisp/tab-line.el (tab-line-mode): Preserve existing value of tab-line-format Keep the old value of tab-line-format when enabling tab-line-mode and don't overwrite it with nil when disabling tab-line-mode (bug#51830). --- diff --git a/lisp/tab-line.el b/lisp/tab-line.el index 5affae79138..110c6e96969 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -893,7 +893,14 @@ sight of the tab line." (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)