Change emojify-image-dir from variable to function

See 19b9bae79f
This commit is contained in:
kissge 2017-01-12 14:23:17 +09:00
parent 7d864662b9
commit 2f364dfae6

View file

@ -733,8 +733,6 @@ everywhere else."
(and (image-type-available-p 'xpm)
(file-exists-p (mode-icons--get-png-xpm-file icon-spec))))) ))
(defvar emojify-image-dir)
(defvar emojify-emojis)
(defvar mode-icons--gimp (executable-find "gimp")
@ -1139,7 +1137,7 @@ ACTIVE is a flag for if the current window is active."
(unless emojify-emojis
(emojify-set-emoji-data))
(let* ((emoji (ht-get emojify-emojis (nth 1 icon-spec)))
(image-file (expand-file-name (ht-get emoji "image") emojify-image-dir))
(image-file (expand-file-name (ht-get emoji "image") (emojify-image-dir)))
(image-type (intern (upcase (file-name-extension image-file)))))
(if (not (file-exists-p image-file))
(propertize (format "%s" mode)