From 1e81fafab68b1bc49c59c7f0ecc51725452733c7 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 24 Oct 2016 18:09:07 +0200 Subject: [PATCH] Fix --set-emoji-font so it works without X --- init.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/init.el b/init.el index 88d5dfb..1569b8e 100644 --- a/init.el +++ b/init.el @@ -773,15 +773,16 @@ ;; https://zhm.github.io/symbola/ (defun --set-emoji-font (frame) "Adjust the font setting of FRAME so Emacs can display Emoji properly." - (if (eq system-type 'darwin) - ;; For NS/Cocoa - (set-fontset-font t 'symbol - (font-spec :family "Apple Color Emoji") - frame 'prepend) - ;; For Linux - (set-fontset-font t 'symbol - (font-spec :family "Symbola") - frame 'prepend))) + (when (fboundp 'set-fontset-font) + (if (eq system-type 'darwin) + ;; For NS/Cocoa + (set-fontset-font t 'symbol + (font-spec :family "Apple Color Emoji") + frame 'prepend) + ;; For Linux + (set-fontset-ont t 'symbol + (font-spec :family "Symbola") + frame 'prepend)))) (use-package company-emoji :ensure t