domtronn / all-the-icons.el

A utility package to collect various Icon Fonts and propertize them within Emacs.
MIT License
1.48k stars 177 forks source link

all-the-icons-XXX-for-mode is not consitently coded #275

Open bestlem opened 3 years ago

bestlem commented 3 years ago

all-the-icons-icon-for-mode and all-the-icons-family-for-mode do not use the same logic.

I found this on helpful-mode (via issues with spaceline-all-the-icons)

(all-the-icons-icon-family-for-mode 'helpful-mode) ; returns nil
(all-the-icons-icon-for-mode 'helpful-mode) ; Gives an icon 

The for mode code deals with the not found icon by looking in the parent mode ie

(icon (cdr (or (assoc mode all-the-icons-mode-icon-alist)
               (assoc (get mode 'derived-mode-parent) all-the-icons-mode-icon-alist))))

whilst all-the-icons-icon-family-for-mode just does the first assoc

wyuenho commented 2 years ago

Feel free to send over a PR