summary refs log tree commit diff stats
path: root/lisp/+tab-bar.el
diff options
context:
space:
mode:
authorCase Duckworth2022-05-27 13:26:19 -0500
committerCase Duckworth2022-05-27 13:26:19 -0500
commit80abceb212b2acb420317232cb2c3d0ab69af13b (patch)
treecac3f2260b593d3c2227743e4895bbc392f5be7f /lisp/+tab-bar.el
parentDon't inhibit redisplay or message when debugging (diff)
downloademacs-80abceb212b2acb420317232cb2c3d0ab69af13b.tar.gz
emacs-80abceb212b2acb420317232cb2c3d0ab69af13b.zip
asdpofiuasdpfoiasjdpfoiajsdf
Diffstat (limited to 'lisp/+tab-bar.el')
-rw-r--r--lisp/+tab-bar.el13
1 files changed, 4 insertions, 9 deletions
diff --git a/lisp/+tab-bar.el b/lisp/+tab-bar.el index e9daaf4..3e6968e 100644 --- a/lisp/+tab-bar.el +++ b/lisp/+tab-bar.el
@@ -7,6 +7,7 @@
7 7
8;;; Code: 8;;; Code:
9 9
10(require 'acdw)
10(require 'tab-bar) 11(require 'tab-bar)
11 12
12(defface +tab-bar-extra 13(defface +tab-bar-extra
@@ -35,7 +36,7 @@
35 "Display `tracking-mode-line-buffers' in the tab-bar." 36 "Display `tracking-mode-line-buffers' in the tab-bar."
36 ;; TODO: write something to convert a mode-line construct to a tab-bar 37 ;; TODO: write something to convert a mode-line construct to a tab-bar
37 ;; construct. 38 ;; construct.
38 (when (and tracking-mode 39 (when (and (bound-and-true-p tracking-mode)
39 (not (and +tracking-hide-when-org-clocking 40 (not (and +tracking-hide-when-org-clocking
40 (bound-and-true-p org-clock-current-task)))) 41 (bound-and-true-p org-clock-current-task))))
41 (cons (when (> (length tracking-mode-line-buffers) 0) 42 (cons (when (> (length tracking-mode-line-buffers) 0)
@@ -261,14 +262,8 @@ name to the left."
261 (require 'shr) ; `shr-string-pixel-width' 262 (require 'shr) ; `shr-string-pixel-width'
262 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format))) 263 (let* ((rest (cdr (memq '+tab-bar-format-align-right tab-bar-format)))
263 (rest (tab-bar-format-list rest)) 264 (rest (tab-bar-format-list rest))
264 (rest (mapconcat (lambda (item) x(nth 2 item)) rest "")) 265 (rest (mapconcat (lambda (item) (nth 2 item)) rest ""))
265 (hpos 266 (hpos (shr-string-pixel-width rest))
266 ;; I have to rewrite `shr-string-pixel-width' to take the tab-bar face
267 ;; into account.
268 (let ((pt (point)))
269 (prog1 (with-temp-buffer (insert (propertize rest 'face 'tab-bar))
270 (shr-pixel-column))
271 (goto-char pt))))
272 (str (propertize " " 'display `(space :align-to (- right (,hpos)))))) 267 (str (propertize " " 'display `(space :align-to (- right (,hpos))))))
273 `((align-right menu-item ,str ignore)))) 268 `((align-right menu-item ,str ignore))))
274 269