]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't use expand-file-name to find images for tabs.
authorJuri Linkov <juri@linkov.net>
Tue, 15 Oct 2019 19:44:10 +0000 (22:44 +0300)
committerJuri Linkov <juri@linkov.net>
Tue, 15 Oct 2019 19:44:10 +0000 (22:44 +0300)
* 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.

lisp/tab-bar.el
lisp/tab-line.el

index 3fe750908b5e7e93016207192c13f76201addfc3..13829efe94ce63666b54667a84135010c9dfb83f 100644 (file)
 
   (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)
index 4397cae255fd1a90f424095a3d22ad1e7b283215..5f2dd3e6dd0e332a076e0104d894e6962734230f 100644 (file)
@@ -130,9 +130,7 @@ If nil, don't show the new tab button."
 (defvar tab-line-new-button
   (propertize " + "
               'display `(image :type xpm
-                               :file ,(expand-file-name
-                                       "images/tabs/new.xpm"
-                                       data-directory)
+                               :file "tabs/new.xpm"
                                :margin (2 . 0)
                                :ascent center)
               'keymap tab-line-add-map
@@ -160,9 +158,7 @@ If nil, don't show it at all."
 (defvar tab-line-close-button
   (propertize " x"
               'display `(image :type xpm
-                               :file ,(expand-file-name
-                                       "images/tabs/close.xpm"
-                                       data-directory)
+                               :file "tabs/close.xpm"
                                :margin (2 . 0)
                                :ascent center)
               'keymap tab-line-tab-close-map