mirror of
https://github.com/ryuslash/mode-icons.git
synced 2024-11-22 01:50:28 +01:00
Add C++ and change specs to integers
This commit is contained in:
parent
62c8be6872
commit
9198e7477e
1 changed files with 18 additions and 14 deletions
|
@ -119,23 +119,24 @@ absolute path to ICON."
|
||||||
("YASnippet" "yas" xpm)
|
("YASnippet" "yas" xpm)
|
||||||
(" yas" "yas" xpm)
|
(" yas" "yas" xpm)
|
||||||
(" hs" "hs" xpm)
|
(" hs" "hs" xpm)
|
||||||
("Markdown" ,(make-string 1 #xf0c9) github-octicons)
|
("Markdown" #xf0c9 github-octicons)
|
||||||
("Scala" ,(make-string 1 #xf15b) font-mfizz)
|
("Scala" #xf15b font-mfizz)
|
||||||
("Magit" ,(make-string 1 #xf1d2) FontAwesome)
|
("Magit" #xf1d2 FontAwesome)
|
||||||
(" Pulls" ,(make-string 1 #xf092) FontAwesome)
|
(" Pulls" #xf092 FontAwesome)
|
||||||
("Zip-Archive" ,(make-string 1 #xf1c6) FontAwesome)
|
("Zip-Archive" #xf1c6 FontAwesome)
|
||||||
("ARev" ,(make-string 1 #xf021) FontAwesome)
|
("ARev" #xf021 FontAwesome)
|
||||||
("Calc\\(ulator\\)?" ,(make-string 1 #xf1ec) FontAwesome)
|
("Calc\\(ulator\\)?" #xf1ec FontAwesome)
|
||||||
("Debug.*" ,(make-string 1 #xf188) FontAwesome)
|
("Debug.*" #xf188 FontAwesome)
|
||||||
("Calendar" ,(make-string 1 #xf073) FontAwesome)
|
("Calendar" #xf073 FontAwesome)
|
||||||
("Help" ,(make-string 1 #xf059) FontAwesome)
|
("Help" #xf059 FontAwesome)
|
||||||
("WoMan" ,(make-string 1 #xf05a) FontAwesome)
|
("WoMan" #xf05a FontAwesome)
|
||||||
("C/l" ,(make-string 1 #xf107) font-mfizz)
|
("C/l" #xf107 font-mfizz)
|
||||||
("Custom" ,(make-string 1 #xf013) FontAwesome)
|
("Custom" #xf013 FontAwesome)
|
||||||
("\\`Go\\'" "go" xpm)
|
("\\`Go\\'" "go" xpm)
|
||||||
(" Rbow" "rainbow" xpm)
|
(" Rbow" "rainbow" xpm)
|
||||||
(" 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)
|
||||||
;; Diminished modes
|
;; Diminished modes
|
||||||
("\\(ElDoc\\|Anzu\\|SP\\|Guide\\|PgLn\\|Undo-Tree\\|Ergo.*\\|,\\|Isearch\\|Ind\\|Fly\\)" nil nil)
|
("\\(ElDoc\\|Anzu\\|SP\\|Guide\\|PgLn\\|Undo-Tree\\|Ergo.*\\|,\\|Isearch\\|Ind\\|Fly\\)" nil nil)
|
||||||
)
|
)
|
||||||
|
@ -148,6 +149,7 @@ without the extension. And the third being the type of icon."
|
||||||
(list (string :tag "Regular Expression")
|
(list (string :tag "Regular Expression")
|
||||||
(choice
|
(choice
|
||||||
(string :tag "Icon Name")
|
(string :tag "Icon Name")
|
||||||
|
(integer :tag "Font Glyph Code")
|
||||||
(const :tag "Suppress" nil))
|
(const :tag "Suppress" nil))
|
||||||
(choice
|
(choice
|
||||||
(const :tag "text" nil)
|
(const :tag "text" nil)
|
||||||
|
@ -247,7 +249,9 @@ ICON-SPEC should be a specification from `mode-icons'."
|
||||||
;; Use `compose-region' because it allows clicable text.
|
;; Use `compose-region' because it allows clicable text.
|
||||||
(with-temp-buffer
|
(with-temp-buffer
|
||||||
(insert mode)
|
(insert mode)
|
||||||
(compose-region (point-min) (point-max) (nth 1 icon-spec))
|
(compose-region (point-min) (point-max) (or (and (integerp (nth 1 icon-spec))
|
||||||
|
(make-string 1 (nth 1 icon-spec)))
|
||||||
|
(nth 1 icon-spec)))
|
||||||
(put-text-property (point-min) (point-max) 'mode-icons-p t)
|
(put-text-property (point-min) (point-max) 'mode-icons-p t)
|
||||||
(buffer-string)))
|
(buffer-string)))
|
||||||
(t (propertize mode 'display (mode-icons-get-icon-display (nth 1 icon-spec) (nth 2 icon-spec)) 'mode-icons-p t)))))
|
(t (propertize mode 'display (mode-icons-get-icon-display (nth 1 icon-spec) (nth 2 icon-spec)) 'mode-icons-p t)))))
|
||||||
|
|
Loading…
Reference in a new issue