]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/tab-bar.el (tab-bar-new-tab-to): Don't funcall const values.
authorJuri Linkov <juri@linkov.net>
Sun, 20 Mar 2022 18:59:04 +0000 (20:59 +0200)
committerJuri Linkov <juri@linkov.net>
Sun, 20 Mar 2022 18:59:04 +0000 (20:59 +0200)
Filter out the values 'clone' and 'window' of 'tab-bar-new-tab-choice'
from function call.

lisp/tab-bar.el

index 245a55a671fecc02f32417d1af8f3f7d005a9259..cf1cca4af3f95f5d238943a12fe4a0608e38e1a3 100644 (file)
@@ -1384,7 +1384,8 @@ After the tab is created, the hooks in
             (split-window) (delete-window))))
 
       (let ((buffer
-             (if (functionp tab-bar-new-tab-choice)
+             (if (and (functionp tab-bar-new-tab-choice)
+                      (not (memq tab-bar-new-tab-choice '(clone window))))
                  (funcall tab-bar-new-tab-choice)
                (if (stringp tab-bar-new-tab-choice)
                    (or (get-buffer tab-bar-new-tab-choice)