[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 65cd66c7d7 1/3: * lisp/tab-bar.el (tab-bar-history-mode-map): New
From: |
Juri Linkov |
Subject: |
master 65cd66c7d7 1/3: * lisp/tab-bar.el (tab-bar-history-mode-map): New defvar-keymap. |
Date: |
Mon, 27 Dec 2021 14:15:54 -0500 (EST) |
branch: master
commit 65cd66c7d7a2e120d533ef26baf499d6ee4e44f0
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>
* lisp/tab-bar.el (tab-bar-history-mode-map): New defvar-keymap.
---
etc/NEWS | 5 +++++
lisp/tab-bar.el | 4 ++++
2 files changed, 9 insertions(+)
diff --git a/etc/NEWS b/etc/NEWS
index cfea513cca..feaa7b425d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -248,6 +248,11 @@ height use 'window-height' in combination with
'body-lines'.
---
*** 'C-x t RET' creates a new tab when the provided tab name doesn't exist.
+---
+*** New keymap 'tab-bar-history-mode-map'.
+By default, it contains 'C-c <left>' and 'C-c <right>' to browse
+the history of tab window configurations back and forward.
+
** Better detection of text suspiciously reordered on display.
The function 'bidi-find-overridden-directionality' has been extended
to detect reordering effects produced by embeddings and isolates
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 07aa0f2d56..7dcd0bdc7b 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -1884,6 +1884,10 @@ This navigates forward in the history of window
configurations."
(goto-char wc-point)))
(message "No more tab forward history"))))
+(defvar-keymap tab-bar-history-mode-map
+ "C-c <left>" #'tab-bar-history-back
+ "C-c <right>" #'tab-bar-history-forward)
+
(define-minor-mode tab-bar-history-mode
"Toggle tab history mode for the tab bar.
Tab history mode remembers window configurations used in every tab,