summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.emacs23
1 files changed, 20 insertions, 3 deletions
diff --git a/.emacs b/.emacs
index 234df07..33951e5 100644
--- a/.emacs
+++ b/.emacs
@@ -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)