diff options
| author | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-10-15 08:57:17 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@gmail.com> | 2021-10-15 08:57:17 +0200 |
| commit | f24b93f2a87e6ce080043014a525f9cf2ce9d544 (patch) | |
| tree | e55f9c7f99255eaaf7a3e7a6b82be01bdfe10c07 /.emacs | |
| parent | 8a89379b0eb659581e9df736a2eed45742e8e3c3 (diff) | |
| download | dotfiles-f24b93f2a87e6ce080043014a525f9cf2ce9d544.tar.xz | |
Tweak Emacs settings
- clarify package initialization comments
- load Modus theme on terminal too
- use emoji variation selector when appropriate
- open patches in read-only mode
- now that Modus has been updated, ditch obsolete option
- etc.
Diffstat (limited to '.emacs')
| -rw-r--r-- | .emacs | 26 |
1 files changed, 11 insertions, 15 deletions
@@ -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))) |
