]> git.eshelyaron.com Git - emacs.git/commitdiff
Disobey display actions while using switch-to-buffer on the tab-line
authorJuri Linkov <juri@linkov.net>
Thu, 4 Apr 2024 06:21:01 +0000 (09:21 +0300)
committerEshel Yaron <me@eshelyaron.com>
Thu, 4 Apr 2024 11:40:26 +0000 (13:40 +0200)
* lisp/tab-line.el (tab-line-select-tab-buffer)
(tab-line-switch-to-prev-tab, tab-line-switch-to-next-tab): Let-bind
switch-to-buffer-obey-display-actions to nil around the call to
switch-to-buffer to restrain buffer switching in bounds of
the same window only (bug#69993).

(cherry picked from commit 57e78f2d49a5b1a2337a15254e7b8c87aa63c83a)

lisp/tab-line.el

index 8c59f7b2e6d640a7d43bf93082b40aae44d303dc..fd18e7b790990789b32be26f32aa56e049668367 100644 (file)
@@ -832,7 +832,8 @@ using the `previous-buffer' command."
         (switch-to-prev-buffer window)))
      (t
       (with-selected-window window
-        (switch-to-buffer buffer))))))
+        (let ((switch-to-buffer-obey-display-actions nil))
+          (switch-to-buffer buffer)))))))
 
 (defcustom tab-line-switch-cycling nil
   "Enable cycling tab switch.
@@ -863,7 +864,8 @@ Its effect is the same as using the `previous-buffer' command
                              (nth (1- (length buffers)) buffers)
                            (nth (1- pos) buffers)))))
           (when (bufferp buffer)
-            (switch-to-buffer buffer)))))))
+            (let ((switch-to-buffer-obey-display-actions nil))
+              (switch-to-buffer buffer))))))))
 
 (defun tab-line-switch-to-next-tab (&optional event)
   "Switch to the next tab's buffer.
@@ -885,7 +887,8 @@ Its effect is the same as using the `next-buffer' command
                              (car buffers)
                            (nth (1+ pos) buffers)))))
           (when (bufferp buffer)
-            (switch-to-buffer buffer)))))))
+            (let ((switch-to-buffer-obey-display-actions nil))
+              (switch-to-buffer buffer))))))))
 
 \f
 (defcustom tab-line-close-tab-function 'bury-buffer