Add advice to set emoji font when cnfonts-mode is activated

This commit is contained in:
Jason TIAN 2023-10-03 11:40:21 +08:00
parent 475d74834d
commit 78fec507a8

View file

@ -154,7 +154,14 @@
;; (my-set-emoji-font)
(add-hook 'focus-in-hook #'my-set-emoji-font)
;; (add-hook 'focus-in-hook #'my-set-emoji-font)
(defun my-advice-cnfonts-mode (&rest _)
"Advice function to set emoji font when cnfonts-mode is activated."
(when cnfonts-mode
(my-set-emoji-font)))
;; Advising cnfonts-mode to include setting emoji font
(advice-add 'cnfonts-mode :after 'my-advice-cnfonts-mode)
;; END: display the emojis }}