emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6de588a: * lisp/tab-bar.el (tab-bar-history-old-minibuffer-depth)


From: Juri Linkov
Subject: master 6de588a: * lisp/tab-bar.el (tab-bar-history-old-minibuffer-depth): Remove variable.
Date: Mon, 22 Nov 2021 12:58:30 -0500 (EST)

branch: master
commit 6de588ad244172466bd1948d27f770a624ff9965
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/tab-bar.el (tab-bar-history-old-minibuffer-depth): Remove variable.
    
    (tab-bar--history-pre-change, tab-bar--history-change): Use minibuffer-depth
    instead of this variable (bug#51370).
---
 lisp/tab-bar.el | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 4bb6391..d331f29 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1818,16 +1818,11 @@ Interactively, prompt for GROUP-NAME."
 (defvar tab-bar-history-done-command nil
   "Command handled by `window-configuration-change-hook'.")
 
-(defvar tab-bar-history-old-minibuffer-depth 0
-  "Minibuffer depth before the current command.")
-
 (defun tab-bar--history-pre-change ()
   ;; Reset before the command could set it
   (setq tab-bar-history-omit nil)
   (setq tab-bar-history-pre-command this-command)
-  (setq tab-bar-history-old-minibuffer-depth (minibuffer-depth))
-  ;; Store window-configuration before possibly entering the minibuffer.
-  (when (zerop tab-bar-history-old-minibuffer-depth)
+  (when (zerop (minibuffer-depth))
     (setq tab-bar-history-old
           `((wc . ,(current-window-configuration))
             (wc-point . ,(point-marker))))))
@@ -1837,15 +1832,13 @@ Interactively, prompt for GROUP-NAME."
              ;; Don't register changes performed by the same command
              ;; repeated in sequence, such as incremental window resizing.
              (not (eq tab-bar-history-done-command 
tab-bar-history-pre-command))
-             ;; Store window-configuration before possibly entering
-             ;; the minibuffer.
-             (zerop tab-bar-history-old-minibuffer-depth))
+             (zerop (minibuffer-depth)))
     (puthash (selected-frame)
              (seq-take (cons tab-bar-history-old
                              (gethash (selected-frame) tab-bar-history-back))
                        tab-bar-history-limit)
-             tab-bar-history-back))
-  (setq tab-bar-history-old nil)
+             tab-bar-history-back)
+    (setq tab-bar-history-old nil))
   (setq tab-bar-history-done-command tab-bar-history-pre-command))
 
 (defun tab-bar-history-back ()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]