From 8b49e99504f7ba30abc90a31b02e2e230e818b75 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 25 Jun 2021 12:38:27 +0300 Subject: [PATCH] * lisp/tab-bar.el (tab-bar--define-keys): Fix global-mode-string (bug#49215) --- lisp/tab-bar.el | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index f3c2fb7ed96..41d565abd58 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -138,15 +138,12 @@ Possible modifier keys are `control', `meta', `shift', `hyper', `super' and (when (and (memq 'tab-bar-format-global tab-bar-format) (member '(global-mode-string ("" global-mode-string " ")) mode-line-misc-info)) - (setq mode-line-misc-info - (append '(global-mode-string - ("" (:eval (if (and tab-bar-mode - (memq 'tab-bar-format-global - tab-bar-format)) - "" global-mode-string)) - " ")) - (remove '(global-mode-string ("" global-mode-string " ")) - mode-line-misc-info))))) + (setf (alist-get 'global-mode-string mode-line-misc-info) + '(("" (:eval (if (and tab-bar-mode + (memq 'tab-bar-format-global + tab-bar-format)) + "" global-mode-string)) + " "))))) (defun tab-bar--undefine-keys () "Uninstall key bindings previously bound by `tab-bar--define-keys'." -- 2.39.2