mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-22 01:50:28 +01:00
Make sure that case in matches is preserved
This commit is contained in:
parent
4febdb5418
commit
6d592fb195
1 changed files with 16 additions and 15 deletions
|
@ -190,7 +190,7 @@ This was stole/modified from `c-save-buffer-state'"
|
||||||
("Custom" #xf013 FontAwesome)
|
("Custom" #xf013 FontAwesome)
|
||||||
("\\`Go\\'" "go" xpm)
|
("\\`Go\\'" "go" xpm)
|
||||||
(" Rbow" "rainbow" xpm)
|
(" Rbow" "rainbow" xpm)
|
||||||
(" Icy" "icy" xpm) ;; http://www.clipartpal.com/clipart_pd/weather/ice_10206.htmlr
|
(" ICY" "icy" xpm) ;; http://www.clipartpal.com/clipart_pd/weather/ice_10206.htmlr
|
||||||
(" Golden" "golden" xpm) ;; Icon created by Arthur Shlain from Noun Project
|
(" Golden" "golden" xpm) ;; Icon created by Arthur Shlain from Noun Project
|
||||||
("BibTeX" "bibtex" xpm)
|
("BibTeX" "bibtex" xpm)
|
||||||
("C[+][+]/l" #xf10c font-mfizz)
|
("C[+][+]/l" #xf10c font-mfizz)
|
||||||
|
@ -451,20 +451,21 @@ ICON-SPEC should be a specification from `mode-icons'."
|
||||||
|
|
||||||
(defun mode-icons-get-icon-spec (mode)
|
(defun mode-icons-get-icon-spec (mode)
|
||||||
"Get icon spec for MODE based on regular expression."
|
"Get icon spec for MODE based on regular expression."
|
||||||
(catch 'found-mode
|
(let (case-fold-search)
|
||||||
(dolist (item mode-icons)
|
(catch 'found-mode
|
||||||
(when (and (mode-icons-supported-p item)
|
(dolist (item mode-icons)
|
||||||
(or
|
(when (and (mode-icons-supported-p item)
|
||||||
(and
|
(or
|
||||||
(stringp (car item))
|
(and
|
||||||
(stringp mode)
|
(stringp (car item))
|
||||||
(string-match-p (car item) mode))
|
(stringp mode)
|
||||||
(and
|
(string-match-p (car item) mode))
|
||||||
(symbolp (car item))
|
(and
|
||||||
(symbolp mode)
|
(symbolp (car item))
|
||||||
(eq mode (car item)))))
|
(symbolp mode)
|
||||||
(throw 'found-mode item)))
|
(eq mode (car item)))))
|
||||||
nil))
|
(throw 'found-mode item)))
|
||||||
|
nil)))
|
||||||
|
|
||||||
(defcustom mode-icons-show-mode-name nil
|
(defcustom mode-icons-show-mode-name nil
|
||||||
"Show Icon and `mode-name'."
|
"Show Icon and `mode-name'."
|
||||||
|
|
Loading…
Reference in a new issue