Subject: bug#33871: 27.0.50; Revert Dired window saved in window configuration

From: Juri Linkov <[email-masked]>
Date: Fri, 29 Mar 2024 18:25:07 +0200

>> +  "Non-nil to restore previous context in every window of the selected tab.
>
> I'd write
>
> "If this is non-nil, try to restore window points from their contexts.
>
> and say what a context is next.
>
>> +This will try to find the same position in the buffer where point was
>> +before switching away from this tab.  After selecting this tab again,
>
> Why "again"?
>
>> +point will be moved to its previous place in the buffer even when
>> +buffer was modified."
>
> "it" or "the buffer".

Thanks for the suggestions, here is the updated docstring:

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index c51600e6c6c..009dc6eed0c 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1442,6 +1445,16 @@ tab-bar-select-restore-windows
           (setq buffer-read-only t)
           (set-window-buffer window new-buffer))))))
 
+(defcustom tab-bar-select-restore-context t
+  "If this is non-nil, try to restore window points from their contexts.
+This will try to find the same position in the buffer where point was
+before switching away from this tab.  After selecting this tab,
+point will be moved to its previous place in the buffer even when
+the buffer was modified."
+  :type 'boolean
+  :group 'tab-bar
+  :version "30.1")
+
 (defvar tab-bar-minibuffer-restore-tab nil
   "Tab number for `tab-bar-minibuffer-restore-tab'.")