diff options
| author | Gabriel do Nascimento Ribeiro | 2020-12-13 15:35:46 -0300 |
|---|---|---|
| committer | Juri Linkov | 2020-12-14 10:54:52 +0200 |
| commit | c6c4e746036c5ba714bfce565de13d713f3cb8b5 (patch) | |
| tree | b0d4282ea3092c024d13b2da63995cd04885b600 | |
| parent | e948cdbfa8508c7fc98a39caaf5e46798e6a3939 (diff) | |
| download | emacs-c6c4e746036c5ba714bfce565de13d713f3cb8b5.tar.gz emacs-c6c4e746036c5ba714bfce565de13d713f3cb8b5.zip | |
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
| -rw-r--r-- | lisp/tab-bar.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 3a705aa015d..9506b1b22ea 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el | |||
| @@ -296,6 +296,16 @@ If nil, don't show it at all." | |||
| 296 | (defvar tab-bar-forward-button " > " | 296 | (defvar tab-bar-forward-button " > " |
| 297 | "Button for going forward in tab history.") | 297 | "Button for going forward in tab history.") |
| 298 | 298 | ||
| 299 | (defcustom tab-bar-history-buttons-show t | ||
| 300 | "Show back and forward buttons when `tab-bar-history-mode' is enabled." | ||
| 301 | :type 'boolean | ||
| 302 | :initialize 'custom-initialize-default | ||
| 303 | :set (lambda (sym val) | ||
| 304 | (set-default sym val) | ||
| 305 | (force-mode-line-update)) | ||
| 306 | :group 'tab-bar | ||
| 307 | :version "28.1") | ||
| 308 | |||
| 299 | (defcustom tab-bar-tab-hints nil | 309 | (defcustom tab-bar-tab-hints nil |
| 300 | "Show absolute numbers on tabs in the tab bar before the tab name. | 310 | "Show absolute numbers on tabs in the tab bar before the tab name. |
| 301 | This helps to select the tab by its number using `tab-bar-select-tab' | 311 | 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." | |||
| 415 | (tabs (funcall tab-bar-tabs-function))) | 425 | (tabs (funcall tab-bar-tabs-function))) |
| 416 | (append | 426 | (append |
| 417 | '(keymap (mouse-1 . tab-bar-handle-mouse)) | 427 | '(keymap (mouse-1 . tab-bar-handle-mouse)) |
| 418 | (when tab-bar-history-mode | 428 | (when (and tab-bar-history-mode tab-bar-history-buttons-show) |
| 419 | `((sep-history-back menu-item ,separator ignore) | 429 | `((sep-history-back menu-item ,separator ignore) |
| 420 | (history-back | 430 | (history-back |
| 421 | menu-item ,tab-bar-back-button tab-bar-history-back | 431 | menu-item ,tab-bar-back-button tab-bar-history-back |