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: 317cea5eef
Ref: #7448
Fix: #7505
This commit is contained in:
Liam Hupfer 2023-11-23 17:17:52 -06:00 committed by GitHub
parent 574cd32147
commit edd95854fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -546,7 +546,9 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original
(dolist (script '(symbol mathematical)) (dolist (script '(symbol mathematical))
(set-fontset-font t script symbol-font))) (set-fontset-font t script symbol-font)))
(when emoji-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 ;; some characters in the Emacs symbol script are often covered by emoji
;; fonts ;; fonts
(set-fontset-font t 'symbol emoji-font nil 'append))) (set-fontset-font t 'symbol emoji-font nil 'append)))