summaryrefslogtreecommitdiff
path: root/lisp/tab-bar.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2019-10-15 22:44:10 +0300
committerJuri Linkov <juri@linkov.net>2019-10-15 22:44:10 +0300
commitffa90546980c71fc0c2355005b382f07405aeeec (patch)
tree8d73be099f1fe37f89d89fe5059c95e7995ff92e /lisp/tab-bar.el
parent4509aaa5b0666a120fb1e255d52d83d03c46c596 (diff)
downloademacs-ffa90546980c71fc0c2355005b382f07405aeeec.tar.gz
emacs-ffa90546980c71fc0c2355005b382f07405aeeec.tar.bz2
emacs-ffa90546980c71fc0c2355005b382f07405aeeec.zip
Don't use expand-file-name to find images for tabs.
* lisp/tab-bar.el (tab-bar-mode): * lisp/tab-line.el (tab-line-new-button, tab-line-close-button): Remove expand-file-name with data-directory.
Diffstat (limited to 'lisp/tab-bar.el')
-rw-r--r--lisp/tab-bar.el28
1 files changed, 12 insertions, 16 deletions
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 3fe750908b5..13829efe94c 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -102,25 +102,21 @@
(when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-new-button)))
;; This file is pre-loaded so only here we can use the right data-directory:
- (let ((file (expand-file-name "images/tabs/new.xpm" data-directory)))
- (when (file-exists-p file)
- (add-text-properties 0 (length tab-bar-new-button)
- `(display (image :type xpm
- :file ,file
- :margin (2 . 0)
- :ascent center))
- tab-bar-new-button))))
+ (add-text-properties 0 (length tab-bar-new-button)
+ `(display (image :type xpm
+ :file "tabs/new.xpm"
+ :margin (2 . 0)
+ :ascent center))
+ tab-bar-new-button))
(when (and tab-bar-mode (not (get-text-property 0 'display tab-bar-close-button)))
;; This file is pre-loaded so only here we can use the right data-directory:
- (let ((file (expand-file-name "images/tabs/close.xpm" data-directory)))
- (when (file-exists-p file)
- (add-text-properties 0 (length tab-bar-close-button)
- `(display (image :type xpm
- :file ,file
- :margin (2 . 0)
- :ascent center))
- tab-bar-close-button))))
+ (add-text-properties 0 (length tab-bar-close-button)
+ `(display (image :type xpm
+ :file "tabs/close.xpm"
+ :margin (2 . 0)
+ :ascent center))
+ tab-bar-close-button))
(when tab-bar-mode
(global-set-key [(control shift iso-lefttab)] 'tab-previous)