summaryrefslogtreecommitdiff
path: root/lisp/tab-line.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2019-11-02 23:39:15 +0200
committerJuri Linkov <juri@linkov.net>2019-11-02 23:39:15 +0200
commit0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4 (patch)
treeec5a59514e596d8d50ca23c8c258b662e60fbb54 /lisp/tab-line.el
parente6b806f29e06e472a44763def6b4d904b5f1ba54 (diff)
downloademacs-0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4.tar.gz
emacs-0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4.tar.bz2
emacs-0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4.zip
* lisp/tab-line.el (tab-line-tab-selected): New face.
(tab-line-format): Use new face tab-line-tab-selected. ([tab-line]): Move tab-switching mouse wheel commands to S-keys.
Diffstat (limited to 'lisp/tab-line.el')
-rw-r--r--lisp/tab-line.el23
1 files changed, 18 insertions, 5 deletions
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index cfb4223bd21..0d3834ab740 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -77,6 +77,17 @@
:version "27.1"
:group 'tab-line-faces)
+(defface tab-line-tab-selected
+ '((default
+ :inherit tab-line-tab)
+ (((class color) (min-colors 88))
+ :background "grey85")
+ (t
+ :inverse-video t))
+ "Tab line face for tab in the selected window."
+ :version "27.1"
+ :group 'tab-line-faces)
+
(defface tab-line-highlight
'((default :inherit tab-line-tab))
"Tab line face for highlighting."
@@ -335,7 +346,9 @@ variable `tab-line-tabs-function'."
`(
tab ,tab
face ,(if (eq tab selected-buffer)
- 'tab-line-tab
+ (if (eq (selected-window) (old-selected-window))
+ 'tab-line-tab-selected
+ 'tab-line-tab)
'tab-line-tab-inactive)
mouse-face tab-line-highlight))))
tabs)))
@@ -517,10 +530,10 @@ from the tab line."
(global-set-key [tab-line wheel-up] 'tab-line-hscroll-left)
(global-set-key [tab-line wheel-down] 'tab-line-hscroll-right)
-(global-set-key [tab-line C-mouse-4] 'tab-line-switch-to-prev-tab)
-(global-set-key [tab-line C-mouse-5] 'tab-line-switch-to-next-tab)
-(global-set-key [tab-line C-wheel-up] 'tab-line-switch-to-prev-tab)
-(global-set-key [tab-line C-wheel-down] 'tab-line-switch-to-next-tab)
+(global-set-key [tab-line S-mouse-4] 'tab-line-switch-to-prev-tab)
+(global-set-key [tab-line S-mouse-5] 'tab-line-switch-to-next-tab)
+(global-set-key [tab-line S-wheel-up] 'tab-line-switch-to-prev-tab)
+(global-set-key [tab-line S-wheel-down] 'tab-line-switch-to-next-tab)
(provide 'tab-line)