From edd95854fd81f60a7132d830d07f4e4f22cbce89 Mon Sep 17 00:00:00 2001 From: Liam Hupfer Date: Thu, 23 Nov 2023 17:17:52 -0600 Subject: [PATCH] fix: premature use of emoji fontset in <=28.1 317cea5 assumed Emacs 28, but Doom still tries to support 27. Attempting to use the undefined emoji script on 27 results in an error. Prior to 28, emoji are part of the symbol script, which the following `set-fontset-font` call already handles. Amend: 317cea5eefda Ref: #7448 Fix: #7505 --- lisp/doom-ui.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index 360998c66..ab5e116a3 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -546,7 +546,9 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (dolist (script '(symbol mathematical)) (set-fontset-font t script symbol-font))) (when emoji-font - (set-fontset-font t 'emoji emoji-font) + ;; DEPRECATED: make unconditional when we drop 27 support + (when (version<= "28.1" emacs-version) + (set-fontset-font t 'emoji emoji-font)) ;; some characters in the Emacs symbol script are often covered by emoji ;; fonts (set-fontset-font t 'symbol emoji-font nil 'append)))