Assume Emacs >= 28

This commit is contained in:
TEC 2022-09-02 01:41:32 +08:00
parent 18aa901670
commit 2b0ccf9d0c
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
2 changed files with 3 additions and 18 deletions

View File

@ -1,7 +1,7 @@
#+title: Doom Emacs Configuration --- [[https://tecosaur.github.io/emacs-config/config.html][HTML Version]], [[https://tecosaur.github.io/emacs-config/config.pdf][PDF]]
#+author: tecosaur
#+html: <a href="https://www.gnu.org/software/emacs/emacs.html#Releases"><img src="https://img.shields.io/badge/Emacs-27.1%20%E2%80%93%2028.0.50-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white"></a>
#+html: <a href="https://www.gnu.org/software/emacs/emacs.html#Releases"><img src="https://img.shields.io/badge/Emacs-28.1-blueviolet.svg?style=flat-square&logo=GNU%20Emacs&logoColor=white"></a>
#+html: <a href="https://orgmode.org"><img src="https://img.shields.io/badge/Org-literate%20config-%2377aa99?style=flat-square&logo=org&logoColor=white"></a>
#+html: <a href="https://github.com/tecosaur/emacs-config/actions"><img src="https://img.shields.io/github/workflow/status/tecosaur/emacs-config/Publish/master.svg?style=flat-square&label=publish&logo=buffer"></a>
#+html: <a href="https://raw.githubusercontent.com/tecosaur/emacs-config/gh-pages/misc/upgradable-packages.txt"><img src="https://raw.githubusercontent.com/tecosaur/emacs-config/gh-pages/misc/pkg-status.svg"></a>

View File

@ -3376,22 +3376,6 @@ about it?
#+end_src
** File types
*** Authinfo
My patch giving my patch giving =authinfo-mode= syntax highlighting is only
available in Emacs28+. For older versions, I've got a package I can use.
#+begin_src emacs-lisp :tangle (if (< emacs-major-version 28) "packages.el" "no")
(package! authinfo-color-mode
:recipe (:local-repo "lisp/authinfo-color-mode"))
#+end_src
Now we just need to load it appropriately.
#+begin_src emacs-lisp :tangle (if (< emacs-major-version 28) "yes" "no")
(use-package! authinfo-color-mode
:mode ("authinfo.gpg\\'" . authinfo-color-mode)
:init (advice-add 'authinfo-mode :override #'authinfo-color-mode))
#+end_src
*** Systemd
For editing systemd unit files
@ -5386,7 +5370,8 @@ need to have a template assigned.
It's nice to see ANSI colour codes displayed. However, until Emacs 28 it's not
possible to do this without modifying the buffer, so let's condition this block
on that.
#+begin_src emacs-lisp :tangle (if (>= emacs-major-version 28) "yes" "no")
#+begin_src emacs-lisp
(after! text-mode
(add-hook! 'text-mode-hook
(unless (derived-mode-p 'org-mode)