all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [patch] two patchs about tab-bar.el
@ 2021-09-10  4:39 tumashu
  2021-09-10  6:33 ` Juri Linkov
  2021-09-10 23:48 ` Feng Shu
  0 siblings, 2 replies; 11+ messages in thread
From: tumashu @ 2021-09-10  4:39 UTC (permalink / raw)
  To: emacs-devel@gnu.org


[-- Attachment #1.1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #1.2: Type: text/html, Size: 111 bytes --]

[-- Attachment #2: 0001-tab-bar-fix-issue-when-current-tab-is-not-at-the-beg.patch --]
[-- Type: application/octet-stream, Size: 1130 bytes --]

From 63ba437acb54fc123b1885de5473345e8b8685f6 Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Fri, 10 Sep 2021 12:23:41 +0800
Subject: [PATCH 1/2] tab-bar: fix issue when 'current-tab is not at the
 beginning of tabs.

* lisp/tab-bar.el (tab-bar-get-buffer-tab): Fix issue when
'current-tab is not at the beginning of tabs.
---
 lisp/tab-bar.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index faa155c53f..54fbc04f3f 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1940,7 +1940,9 @@ tab-bar-get-buffer-tab
                        (member (buffer-name buffer) buffers))))
               (append tab `((index . ,(tab-bar--tab-index tab nil frame))
                             (frame . ,frame)))))
-          (funcall tab-bar-tabs-function frame)))
+          (let ((tabs (funcall tab-bar-tabs-function frame)))
+            ;; Make sure current-tab is alway at the beginning of tabs.
+            (push (assq 'current-tab tabs) tabs))))
        (tab-bar--reusable-frames all-frames)))))
 
 (defun display-buffer-in-tab (buffer alist)
-- 
2.30.2


[-- Attachment #3: 0002-lisp-tab-bar.el-display-buffer-in-tab-Improve-docstr.patch --]
[-- Type: application/octet-stream, Size: 993 bytes --]

From 779dc12d680cd62a5f6da378f9e8bdcebd5602df Mon Sep 17 00:00:00 2001
From: Feng Shu <tumashu@163.com>
Date: Fri, 10 Sep 2021 12:35:37 +0800
Subject: [PATCH 2/2] * lisp/tab-bar.el (display-buffer-in-tab): Improve
 docstring.

---
 lisp/tab-bar.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 54fbc04f3f..451af70f01 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1962,11 +1962,12 @@ display-buffer-in-tab
 
 If ALIST contains a `reusable-frames' entry, its value determines
 which frames to search for a reusable tab:
-  nil -- the selected frame (actually the last non-minibuffer frame)
+  nil -- do not reuse any frames.
   A frame   -- just that frame
   `visible' -- all visible frames
   0   -- all frames on the current terminal
   t   -- all frames.
+  others -- selected frame.
 
 This is an action function for buffer display, see Info
 node `(elisp) Buffer Display Action Functions'.  It should be
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-09-12 16:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-10  4:39 [patch] two patchs about tab-bar.el tumashu
2021-09-10  6:33 ` Juri Linkov
2021-09-10 13:18   ` tumashu
2021-09-10 13:24   ` tumashu
2021-09-10 13:36   ` tumashu
2021-09-10 16:17     ` Juri Linkov
2021-09-10 18:33   ` tumashu
2021-09-12  7:03     ` Juri Linkov
2021-09-12  9:34       ` tumashu
2021-09-12 16:10         ` Juri Linkov
2021-09-10 23:48 ` Feng Shu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.