From 9198e7477e5a5e2038d840d19d3bca4b9c799030 Mon Sep 17 00:00:00 2001 From: Matthew L. Fidler Date: Thu, 11 Feb 2016 22:37:00 -0600 Subject: Add C++ and change specs to integers --- mode-icons.el | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/mode-icons.el b/mode-icons.el index 2b752f0..ef84a85 100644 --- a/mode-icons.el +++ b/mode-icons.el @@ -119,23 +119,24 @@ absolute path to ICON." ("YASnippet" "yas" xpm) (" yas" "yas" xpm) (" hs" "hs" xpm) - ("Markdown" ,(make-string 1 #xf0c9) github-octicons) - ("Scala" ,(make-string 1 #xf15b) font-mfizz) - ("Magit" ,(make-string 1 #xf1d2) FontAwesome) - (" Pulls" ,(make-string 1 #xf092) FontAwesome) - ("Zip-Archive" ,(make-string 1 #xf1c6) FontAwesome) - ("ARev" ,(make-string 1 #xf021) FontAwesome) - ("Calc\\(ulator\\)?" ,(make-string 1 #xf1ec) FontAwesome) - ("Debug.*" ,(make-string 1 #xf188) FontAwesome) - ("Calendar" ,(make-string 1 #xf073) FontAwesome) - ("Help" ,(make-string 1 #xf059) FontAwesome) - ("WoMan" ,(make-string 1 #xf05a) FontAwesome) - ("C/l" ,(make-string 1 #xf107) font-mfizz) - ("Custom" ,(make-string 1 #xf013) FontAwesome) + ("Markdown" #xf0c9 github-octicons) + ("Scala" #xf15b font-mfizz) + ("Magit" #xf1d2 FontAwesome) + (" Pulls" #xf092 FontAwesome) + ("Zip-Archive" #xf1c6 FontAwesome) + ("ARev" #xf021 FontAwesome) + ("Calc\\(ulator\\)?" #xf1ec FontAwesome) + ("Debug.*" #xf188 FontAwesome) + ("Calendar" #xf073 FontAwesome) + ("Help" #xf059 FontAwesome) + ("WoMan" #xf05a FontAwesome) + ("C/l" #xf107 font-mfizz) + ("Custom" #xf013 FontAwesome) ("\\`Go\\'" "go" xpm) (" Rbow" "rainbow" xpm) (" Golden" "golden" xpm) ;; Icon created by Arthur Shlain from Noun Project ("BibTeX" "bibtex" xpm) + ("C[+][+]/l" #xf10c font-mfizz) ;; Diminished modes ("\\(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") (choice (string :tag "Icon Name") + (integer :tag "Font Glyph Code") (const :tag "Suppress" nil)) (choice (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. (with-temp-buffer (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) (buffer-string))) (t (propertize mode 'display (mode-icons-get-icon-display (nth 1 icon-spec) (nth 2 icon-spec)) 'mode-icons-p t))))) -- cgit v1.2.3-54-g00ecf