summaryrefslogtreecommitdiff
path: root/.emacs
diff options
context:
space:
mode:
Diffstat (limited to '.emacs')
-rw-r--r--.emacs26
1 files changed, 11 insertions, 15 deletions
diff --git a/.emacs b/.emacs
index 86c14dd..ffb1c04 100644
--- a/.emacs
+++ b/.emacs
@@ -7,15 +7,17 @@
;; resets global-page-break-lines-mode to nil. Cue Custom shrugging,
;; "changed outside Customize".
-;; NB: starting from Emacs 27, package-initialize is automatically
-;; called before loading the user's init file, unless
-;; package-enable-at-startup is set to nil in the early init file.
-(when (< emacs-major-version 27)
+;; Emacs≥27 automatically calls package-initialize before loading the
+;; user's init file, unless package-enable-at-startup is set to nil in
+;; the early init file.
+(unless (>= emacs-major-version 27)
(package-initialize))
(setq custom-file "~/.emacs-custom.el")
(load custom-file)
+(when (>= emacs-major-version 28)
+ (load-theme 'modus-vivendi t))
;; Key bindings
@@ -235,10 +237,8 @@
;; Window management
+;; Bindings ala Terminator
(when window-system
- (when (>= emacs-major-version 28)
- (load-theme 'modus-vivendi t))
- ;; Bindings ala Terminator
(global-set-key (kbd "C-S-o") 'split-window-below)
(global-set-key (kbd "C-S-e") 'split-window-right)
(global-set-key (kbd "C-+") 'text-scale-adjust)
@@ -284,7 +284,7 @@
(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)))))
+ (setcar indicator (apply #'propertize "⚙️" (append new-props old-props)))))
(add-hook 'magit-pre-refresh-hook 'diff-hl-magit-pre-refresh)
(add-hook 'magit-post-refresh-hook 'diff-hl-magit-post-refresh)
@@ -470,17 +470,13 @@
(my/describe-message id url))))
;; Font stuff 🤷🤦.
-(cond
- ((= emacs-major-version 27)
+(when (= emacs-major-version 27)
;; Emacs 27 added support for color fonts, but the default fontset
;; did not use any such font for emoji.
(set-fontset-font t 'symbol "Noto Color Emoji" nil 'prepend)
- ;; Make sure the default font does not get overzealous (⚠⚙).
+ ;; Make sure the default font does not get overzealous: ⚠⚙.
+ ;; For Emacs 28, prefer VS-16: ⚠️⚙️.
(setq use-default-font-for-symbols nil))
- ((>= emacs-major-version 28)
- ;; Emacs 28 added an "emoji" script for easier customization, and
- ;; uses a color font for *most* emoji, but not all.
- (set-fontset-font t 'emoji "Noto Color Emoji" nil 'prepend)))
(defun my/project-root ()
(when-let ((project (project-current)))