Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong fonts being used when font-lock-mode is enabled #106

Merged
merged 1 commit into from
Feb 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions all-the-icons.el
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
;; ;; AWS
("^stack.*.json$" all-the-icons-alltheicon "aws" :face all-the-icons-orange)


("^serverless\\.yml$" all-the-icons-faicon "bolt" :v-adjust 0.0 :face all-the-icons-yellow)
("\\.[jc]son$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-yellow)
("\\.ya?ml$" all-the-icons-octicon "settings" :v-adjust 0.0 :face all-the-icons-dyellow)
Expand Down Expand Up @@ -808,13 +808,14 @@ FONT-NAME is the name of the .ttf file providing the font, defaults to FAMILY."
(family ,family))
(unless icon
(error (format "Unable to find icon with name `%s' in icon set `%s'" icon-name (quote ,name))))
(propertize icon
'face (if other-face
`(:family ,family :height ,height :inherit ,other-face)
`(:family ,family :height ,height))
'display `(raise ,v-adjust)
'rear-nonsticky t
'font-lock-ignore t)))
(let ((face (if other-face
`(:family ,family :height ,height :inherit ,other-face)
`(:family ,family :height ,height))))
(propertize icon
'face face ;so that this works without `font-lock-mode' enabled
'font-lock-face face ;so that `font-lock-mode' leaves this alone
'display `(raise ,v-adjust)
'rear-nonsticky t))))
(defun ,(all-the-icons--insert-function-name name) (&optional arg)
,(format "Insert a %s icon at point." family)
(interactive "P")
Expand Down