diff options
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -264,6 +264,17 @@ ;; Online packages configuration +(defun my/symbol-as-icon (c) + ;; By default, Emacs 28 uses color fonts for characters from (1) the + ;; 'emoji script (2) the 'symbol script, when followed by VS-16. + ;; Meanwhile, Emacs 27 knows how to display color fonts, but (1) it + ;; has no 'emoji script (2) it doesn't know what to do with VS-16. + ;; Bottomline: on Emacs 28, explicitly ask for the emoji + ;; presentation with VS-16; on older emacsen, just use the + ;; character, and rely on a blanket fontset rule to prefer color + ;; fonts for the whole 'symbol script. + (apply 'string `(,c ,@(when (>= emacs-major-version 28) + '(?\N{VARIATION SELECTOR-16}))))) ;; So long, Will Mengarini. (delight 'abbrev-mode nil 'abbrev) @@ -272,7 +283,9 @@ (delight 'auto-revert-tail-mode "โค" 'autorevert) (delight 'eldoc-mode "๐" 'eldoc) (delight 'footnote-mode "ยน" 'footnote) -(delight 'flyspell-mode (propertize "๐" 'face 'flyspell-incorrect) 'flyspell) +(delight 'flyspell-mode (propertize (my/symbol-as-icon ?๐) + 'face 'flyspell-incorrect) + 'flyspell) (delight 'hi-lock-mode nil 'hi-lock) (delight 'hs-minor-mode "โฆ" 'hideshow) (delight 'isearch-mode "๐" 'isearch) @@ -296,8 +309,12 @@ 'compile) (let* ((indicator (alist-get 'compilation-in-progress mode-line-modes)) (old-props (text-properties-at 0 (car indicator))) - (new-props '(face compilation-mode-line-run))) - (setcar indicator (apply #'propertize "โ๏ธ" (append new-props old-props))))) + (face (if (>= emacs-major-version 28) + 'modus-themes-intense-yellow + `(:background ,(face-foreground 'warning)))) + (new-props (append `(face ,face) old-props)) + (icon (my/symbol-as-icon ?โ))) + (setcar indicator (concat (apply #'propertize icon new-props) " ")))) (add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh) (add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh) |
