Refactor doom-fix-unicode

This commit is contained in:
Henrik Lissner 2016-06-05 23:03:47 -04:00
parent c981b7fa5e
commit 2c44b65bc7
5 changed files with 42 additions and 21 deletions

View file

@ -322,13 +322,20 @@ Examples:
(load "autoloads"))
(message "Done!")))
(defun doom-fix-unicode (font chars &optional size)
(defun doom-fix-unicode (font &rest chars)
"Display certain unicode characters in a specific font.
e.g. (doom-fix-unicode \"DejaVu Sans\" '(?⚠ ?★ ?➊ ?➋ ?➌ ?➍ ?➎ ?❻ ?➐ ?➑ ?➒ ?➓))"
e.g. (doom-fix-unicode \"DejaVu Sans\" ?⚠ ?★ )"
(declare (indent 1))
(mapc (lambda (x) (set-fontset-font
t (cons x x)
(font-spec :name font :size size)))
(cond ((fontp font)
font)
((listp font)
(font-spec :family (car font) :size (nth 1 font)))
((stringp font)
(font-spec :family font))
(t (error "FONT is an invalid type: %s" font)))))
chars))
(defun doom-byte-compile (&optional minimal)