diff options
| author | Juri Linkov | 2019-11-02 23:39:15 +0200 |
|---|---|---|
| committer | Juri Linkov | 2019-11-02 23:39:15 +0200 |
| commit | 0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4 (patch) | |
| tree | ec5a59514e596d8d50ca23c8c258b662e60fbb54 | |
| parent | e6b806f29e06e472a44763def6b4d904b5f1ba54 (diff) | |
| download | emacs-0b9dc0a8fe7ce66d5a79ffefd7ca9b42882e3fe4.tar.gz 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.
| -rw-r--r-- | lisp/tab-line.el | 23 |
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 @@ | |||
| 77 | :version "27.1" | 77 | :version "27.1" |
| 78 | :group 'tab-line-faces) | 78 | :group 'tab-line-faces) |
| 79 | 79 | ||
| 80 | (defface tab-line-tab-selected | ||
| 81 | '((default | ||
| 82 | :inherit tab-line-tab) | ||
| 83 | (((class color) (min-colors 88)) | ||
| 84 | :background "grey85") | ||
| 85 | (t | ||
| 86 | :inverse-video t)) | ||
| 87 | "Tab line face for tab in the selected window." | ||
| 88 | :version "27.1" | ||
| 89 | :group 'tab-line-faces) | ||
| 90 | |||
| 80 | (defface tab-line-highlight | 91 | (defface tab-line-highlight |
| 81 | '((default :inherit tab-line-tab)) | 92 | '((default :inherit tab-line-tab)) |
| 82 | "Tab line face for highlighting." | 93 | "Tab line face for highlighting." |
| @@ -335,7 +346,9 @@ variable `tab-line-tabs-function'." | |||
| 335 | `( | 346 | `( |
| 336 | tab ,tab | 347 | tab ,tab |
| 337 | face ,(if (eq tab selected-buffer) | 348 | face ,(if (eq tab selected-buffer) |
| 338 | 'tab-line-tab | 349 | (if (eq (selected-window) (old-selected-window)) |
| 350 | 'tab-line-tab-selected | ||
| 351 | 'tab-line-tab) | ||
| 339 | 'tab-line-tab-inactive) | 352 | 'tab-line-tab-inactive) |
| 340 | mouse-face tab-line-highlight)))) | 353 | mouse-face tab-line-highlight)))) |
| 341 | tabs))) | 354 | tabs))) |
| @@ -517,10 +530,10 @@ from the tab line." | |||
| 517 | (global-set-key [tab-line wheel-up] 'tab-line-hscroll-left) | 530 | (global-set-key [tab-line wheel-up] 'tab-line-hscroll-left) |
| 518 | (global-set-key [tab-line wheel-down] 'tab-line-hscroll-right) | 531 | (global-set-key [tab-line wheel-down] 'tab-line-hscroll-right) |
| 519 | 532 | ||
| 520 | (global-set-key [tab-line C-mouse-4] 'tab-line-switch-to-prev-tab) | 533 | (global-set-key [tab-line S-mouse-4] 'tab-line-switch-to-prev-tab) |
| 521 | (global-set-key [tab-line C-mouse-5] 'tab-line-switch-to-next-tab) | 534 | (global-set-key [tab-line S-mouse-5] 'tab-line-switch-to-next-tab) |
| 522 | (global-set-key [tab-line C-wheel-up] 'tab-line-switch-to-prev-tab) | 535 | (global-set-key [tab-line S-wheel-up] 'tab-line-switch-to-prev-tab) |
| 523 | (global-set-key [tab-line C-wheel-down] 'tab-line-switch-to-next-tab) | 536 | (global-set-key [tab-line S-wheel-down] 'tab-line-switch-to-next-tab) |
| 524 | 537 | ||
| 525 | 538 | ||
| 526 | (provide 'tab-line) | 539 | (provide 'tab-line) |