emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master ffa9054: Don't use expand-file-name to find images


From: Juri Linkov
Subject: [Emacs-diffs] master ffa9054: Don't use expand-file-name to find images for tabs.
Date: Tue, 15 Oct 2019 15:44:17 -0400 (EDT)

branch: master
commit ffa90546980c71fc0c2355005b382f07405aeeec
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    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.
---
 lisp/tab-bar.el  | 28 ++++++++++++----------------
 lisp/tab-line.el |  8 ++------
 2 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 3fe7509..13829ef 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)
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index 4397cae..5f2dd3e 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]