diff --git a/dashboard-widgets.el b/dashboard-widgets.el index d67b423f..016b743a 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -21,9 +21,8 @@ ;;; Code: ;; Compiler pacifier -(declare-function all-the-icons-dir-is-submodule "ext:all-the-icons.el") +(declare-function all-the-icons-icon-for-dir "ext:all-the-icons.el") (declare-function all-the-icons-icon-for-file "ext:all-the-icons.el") -(declare-function all-the-icons-match-to-alist "ext:all-the-icons.el") (declare-function bookmark-get-filename "ext:bookmark.el") (declare-function bookmark-all-names "ext:bookmark.el") (declare-function calendar-date-compare "ext:calendar.el") @@ -498,20 +497,7 @@ WIDGET-PARAMS are passed to the \"widget-create\" function." (let* ((path (car (last (split-string ,@rest " - ")))) (icon (if (and (not (file-remote-p path)) (file-directory-p path)) - (cond - ((and (fboundp 'tramp-tramp-file-p) - (tramp-tramp-file-p default-directory)) - (all-the-icons-octicon "file-directory" :height 1.0 :v-adjust 0.01)) - ((file-symlink-p path) - (all-the-icons-octicon "file-symlink-directory" - :height 1.0 :v-adjust 0.01)) - ((all-the-icons-dir-is-submodule path) - (all-the-icons-octicon "file-submodule" :height 1.0 :v-adjust 0.01)) - ((file-exists-p (format "%s/.git" path)) - (all-the-icons-octicon "repo" :height 1.1 :v-adjust 0.01)) - (t (let ((matcher (all-the-icons-match-to-alist - path all-the-icons-dir-icon-alist))) - (apply (car matcher) (list (cadr matcher) :v-adjust 0.01))))) + (all-the-icons-icon-for-dir path nil "") (cond ((string-equal ,section-name "Agenda for today:") (all-the-icons-octicon "primitive-dot" :height 1.0 :v-adjust 0.01))