]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-bar.el (tab-bar--define-keys): Fix global-mode-string (bug#49215)
authorJuri Linkov <juri@linkov.net>
Fri, 25 Jun 2021 09:38:27 +0000 (12:38 +0300)
committerJuri Linkov <juri@linkov.net>
Fri, 25 Jun 2021 09:38:27 +0000 (12:38 +0300)
lisp/tab-bar.el

index f3c2fb7ed9680b17560d4ec4d69364e439a3c7e5..41d565abd5811f0ebd2c7b15b4c6700f0b0f8746 100644 (file)
@@ -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'."