mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-05-10 22:09:43 -07:00
refactor: modules: drop Emacs 28 support (part 2)
Removing 27-28 compatibility code from modules, since 28.x support was dropped in9fbae87. Ref:9fbae872c5
This commit is contained in:
parent
541207196f
commit
b52818be56
13 changed files with 8 additions and 92 deletions
|
|
@ -210,11 +210,6 @@ See `+corfu-want-minibuffer-completion'."
|
|||
(advice-add #'comint-completion-at-point :around #'cape-wrap-nonexclusive)
|
||||
(advice-add #'eglot-completion-at-point :around #'cape-wrap-nonexclusive)
|
||||
(advice-add #'pcomplete-completions-at-point :around #'cape-wrap-nonexclusive)
|
||||
;; From the `cape' readme. Without this, Eshell autocompletion is broken on
|
||||
;; Emacs28.
|
||||
(when (< emacs-major-version 29)
|
||||
(advice-add #'pcomplete-completions-at-point :around #'cape-wrap-silent)
|
||||
(advice-add #'pcomplete-completions-at-point :around #'cape-wrap-purify))
|
||||
|
||||
(when (modulep! :lang latex)
|
||||
;; Allow file completion on latex directives.
|
||||
|
|
|
|||
|
|
@ -148,8 +148,7 @@
|
|||
|
||||
;;; <leader> i --- insert
|
||||
(:prefix-map ("i" . "insert")
|
||||
(:when (> emacs-major-version 28)
|
||||
:desc "Emoji" "e" #'emoji-search)
|
||||
:desc "Emoji" "e" #'emoji-search
|
||||
(:when (modulep! :ui emoji)
|
||||
:desc "Emoji" "e" #'emojify-insert-emoji)
|
||||
:desc "Current file name" "f" #'+default/insert-file-path
|
||||
|
|
|
|||
|
|
@ -580,8 +580,7 @@
|
|||
|
||||
;;; <leader> i --- insert
|
||||
(:prefix-map ("i" . "insert")
|
||||
(:when (> emacs-major-version 28)
|
||||
:desc "Emoji" "e" #'emoji-search)
|
||||
:desc "Emoji" "e" #'emoji-search
|
||||
(:when (modulep! :ui emoji)
|
||||
:desc "Emoji" "e" #'emojify-insert-emoji)
|
||||
:desc "Current file name" "f" #'+default/insert-file-path
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ directives. By default, this only recognizes C directives."
|
|||
evil-undo-system
|
||||
(cond ((modulep! :emacs undo +tree) 'undo-tree)
|
||||
((modulep! :emacs undo) 'undo-fu)
|
||||
((> emacs-major-version 27) 'undo-redo)))
|
||||
('undo-redo)))
|
||||
|
||||
;; Fix #7141
|
||||
(defadvice! +evil--persist-state-a (fn &rest args)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@
|
|||
|
||||
(use-package! vundo
|
||||
:unless (modulep! +tree)
|
||||
:when (> emacs-major-version 27)
|
||||
:defer t
|
||||
:config
|
||||
(setq vundo-glyph-alist vundo-unicode-symbols
|
||||
|
|
|
|||
|
|
@ -9,5 +9,4 @@
|
|||
(package! undo-fu-session
|
||||
:recipe (:host github :repo "emacsmirror/undo-fu-session")
|
||||
:pin "92d733a5b162a70c572fac17b9f9e872426df547")
|
||||
(when (> emacs-major-version 27) ; unsupported in 27
|
||||
(package! vundo :pin "288d1b06ea9283852640bb49532e57ae0515492f")))
|
||||
(package! vundo :pin "288d1b06ea9283852640bb49532e57ae0515492f"))
|
||||
|
|
|
|||
|
|
@ -118,15 +118,3 @@
|
|||
|
||||
(use-package! quarto-mode
|
||||
:mode (("\\.[qQ][mM][dD]" . poly-quarto-mode)))
|
||||
|
||||
|
||||
;; See emacs-ess/ESS#1193
|
||||
(use-package! xterm-color
|
||||
:when (< emacs-major-version 29)
|
||||
:defer t
|
||||
:init
|
||||
(add-hook! 'inferior-ess-mode-hook
|
||||
(setq-local ansi-color-for-comint-mode nil)
|
||||
(add-hook 'comint-preoutput-filter-functions #'xterm-color-filter nil t))
|
||||
:config
|
||||
(setq xterm-color-use-bold t))
|
||||
|
|
|
|||
|
|
@ -16,7 +16,3 @@
|
|||
(package! company-stan :pin "2bfd1484e1a99f9971b1a8aa1b587cdca411ab55"))
|
||||
(when (modulep! :checkers syntax -flymake)
|
||||
(package! flycheck-stan :pin "2bfd1484e1a99f9971b1a8aa1b587cdca411ab55")))
|
||||
|
||||
(when (< emacs-major-version 29)
|
||||
;; See emacs-ess/ESS#1193
|
||||
(package! xterm-color :pin "86fab1d247eb5ebe6b40fa5073a70dfa487cd465"))
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/scheme/packages.el
|
||||
|
||||
(when (< emacs-major-version 29)
|
||||
(package! scheme
|
||||
:recipe (:host gitlab :repo "flatwhatson/scheme-mode")
|
||||
:pin "a713b253d2ff5bbaeef400a7d495f7dfe918a641"))
|
||||
|
||||
(when (package! geiser :pin "06c3db4a053331e3d1fb8642a49c7a9b810cf5cb")
|
||||
(package! macrostep-geiser :pin "f6a2d5bb96ade4f23df557649af87ebd0cc45125")
|
||||
(when (modulep! +chez)
|
||||
|
|
|
|||
|
|
@ -153,51 +153,7 @@ You should use `set-eshell-alias!' to change this.")
|
|||
(setq +eshell--default-aliases eshell-command-aliases-list
|
||||
eshell-command-aliases-list
|
||||
(append eshell-command-aliases-list
|
||||
+eshell-aliases)))
|
||||
|
||||
;; HACK: Fixes #3817, where eshell completion after quotes is broken on Emacs
|
||||
;; 28 and older.
|
||||
;; CREDIT: Extracted from `cape''s cape-wrap-silent and cape-wrap-purify.
|
||||
;; REVIEW: Remove when Doom drops 28 support.
|
||||
(when (< emacs-major-version 29)
|
||||
(defadvice! +eshell--silent-a (capf)
|
||||
"Call CAPF and silence it (no messages, no errors).
|
||||
This function can be used as an advice around an existing Capf."
|
||||
:around #'pcomplete-completions-at-point
|
||||
(letf! ((defmacro silent (&rest body) `(quiet! (ignore-errors ,@body)))
|
||||
(defmacro wrapped-table (wrap body)
|
||||
`(lambda (str pred action)
|
||||
(,@body
|
||||
(let ((result (complete-with-action action table str pred)))
|
||||
(when
|
||||
(and (eq action 'completion--unquote)
|
||||
(functionp (cadr result)))
|
||||
(cl-callf ,wrap (cadr result)))
|
||||
result))))
|
||||
(defun* silent-table (table) (wrapped-table silent-table (silent))))
|
||||
(pcase (silent (funcall capf))
|
||||
(`(,beg ,end ,table . ,plist)
|
||||
`(,beg ,end ,(silent-table table) ,@plist)))))
|
||||
|
||||
(defadvice! +eshell--purify-a (capf)
|
||||
"Call CAPF and ensure that it does not illegally modify the buffer. This
|
||||
function can be used as an advice around an existing Capf. It has been
|
||||
introduced mainly to fix the broken `pcomplete-completions-at-point' function in
|
||||
Emacs versions < 29."
|
||||
;; bug#50470: Fix Capfs which illegally modify the buffer or which
|
||||
;; illegally call `completion-in-region'. The workaround here was proposed
|
||||
;; by @jakanakaevangeli and is used in his capf-autosuggest package.
|
||||
:around #'pcomplete-completions-at-point
|
||||
(catch 'illegal-completion-in-region
|
||||
(condition-case nil
|
||||
(let ((buffer-read-only t)
|
||||
(inhibit-read-only nil)
|
||||
(completion-in-region-function
|
||||
(lambda (beg end coll pred)
|
||||
(throw 'illegal-completion-in-region
|
||||
(list beg end coll :predicate pred)))))
|
||||
(funcall capf))
|
||||
(buffer-read-only nil))))))
|
||||
+eshell-aliases))))
|
||||
|
||||
|
||||
(after! esh-mode
|
||||
|
|
|
|||
|
|
@ -2,7 +2,4 @@
|
|||
;;; tools/docker/packages.el
|
||||
|
||||
(package! docker :pin "916686b86e83a3bd2281fbc5e6f98962aa747429")
|
||||
;; tramp-container (included with Emacs 29+) replaces docker-tramp
|
||||
(when (< emacs-major-version 29)
|
||||
(package! docker-tramp :pin "19d0771db4e6b89e19c00af5806438e315779c15"))
|
||||
(package! dockerfile-mode :pin "97733ce074b1252c1270fd5e8a53d178b66668ed")
|
||||
|
|
|
|||
|
|
@ -144,11 +144,7 @@ isn't disabled in `+ligatures-extras-in-modes'."
|
|||
(fboundp 'mac-auto-operator-composition-mode))
|
||||
(add-hook 'doom-init-ui-hook #'mac-auto-operator-composition-mode 'append))
|
||||
|
||||
;; This module does not support Emacs 27 and less, but if we still try to
|
||||
;; enable ligatures, it will end up in catastrophic work-loss errors, so we
|
||||
;; leave the check here for safety.
|
||||
((and (> emacs-major-version 27)
|
||||
(or (featurep 'ns)
|
||||
((and (or (featurep 'ns)
|
||||
(string-match-p "HARFBUZZ" system-configuration-features))
|
||||
(featurep 'composite)) ; Emacs loads `composite' at startup
|
||||
|
||||
|
|
|
|||
|
|
@ -5,12 +5,9 @@
|
|||
(fboundp 'mac-auto-operator-composition-mode))
|
||||
(ignore))
|
||||
|
||||
((and (> emacs-major-version 27)
|
||||
(or (featurep 'ns)
|
||||
((and (or (featurep 'ns)
|
||||
(string-match-p "HARFBUZZ" system-configuration-features))
|
||||
(featurep 'composite)) ; Emacs loads `composite' at startup
|
||||
(ignore))
|
||||
|
||||
((if (featurep :system 'macos)
|
||||
(warn! "The (:ui ligatures) module does not support your version of Emacs. Install emacs-plus with at least Emacs 28, or emacs-mac.")
|
||||
(warn! "The (:ui ligatures) module does not support your version of Emacs. Make sure to have at least Emacs 28 with Harfbuzz configured (should be the default)."))))
|
||||
((error! "Emacs was not built with Harfbuzz; ligatures won't work!")))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue