emacs-diffs
[Top][All Lists]
Advanced

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

master c6c4e74: New option tab-bar-history-buttons-show


From: Juri Linkov
Subject: master c6c4e74: New option tab-bar-history-buttons-show
Date: Mon, 14 Dec 2020 03:56:07 -0500 (EST)

branch: master
commit c6c4e746036c5ba714bfce565de13d713f3cb8b5
Author: Gabriel do Nascimento Ribeiro <gabriel.nascimento@nubank.com.br>
Commit: Juri Linkov <juri@linkov.net>

    New option tab-bar-history-buttons-show
    
        * lisp/tab-bar.el (tab-bar-history-buttons-show): If true,
        show back and forward buttons when tab-bar-history-mode
        is enabled.  (Bug#45227)
    
        Copyright-paperwork-exempt: yes
---
 lisp/tab-bar.el | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 3a705aa..9506b1b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -296,6 +296,16 @@ If nil, don't show it at all."
 (defvar tab-bar-forward-button " > "
   "Button for going forward in tab history.")
 
+(defcustom tab-bar-history-buttons-show t
+  "Show back and forward buttons when `tab-bar-history-mode' is enabled."
+  :type 'boolean
+  :initialize 'custom-initialize-default
+  :set (lambda (sym val)
+         (set-default sym val)
+         (force-mode-line-update))
+  :group 'tab-bar
+  :version "28.1")
+
 (defcustom tab-bar-tab-hints nil
   "Show absolute numbers on tabs in the tab bar before the tab name.
 This helps to select the tab by its number using `tab-bar-select-tab'
@@ -415,7 +425,7 @@ Return its existing value or a new value."
          (tabs (funcall tab-bar-tabs-function)))
     (append
      '(keymap (mouse-1 . tab-bar-handle-mouse))
-     (when tab-bar-history-mode
+     (when (and tab-bar-history-mode tab-bar-history-buttons-show)
        `((sep-history-back menu-item ,separator ignore)
          (history-back
           menu-item ,tab-bar-back-button tab-bar-history-back



reply via email to

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