mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-05-11 14:27:15 -07:00
refactor!: modules: drop Emacs 28 support
BREAKING CHANGE: This formally drops Emacs 28 support for Doom's modules (Doom core will continue to support 27+, however). A number of packages upstream are dropping support for 28, 31 is due to release within the next few weeks, and tree-sitter support is a hopeless mess on 28, so I'll drop support now. Some compatibility code has been removed; the rest will trickle in after v3. Upgrade Emacs, folks!
This commit is contained in:
parent
2cfa2ff00b
commit
9fbae872c5
6 changed files with 2 additions and 121 deletions
|
|
@ -101,8 +101,8 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
|
|||
- **Required:**
|
||||
- GNU Emacs 27.1–30.2 (30.2 is recommended)
|
||||
- If only using Doom's core, 27.1+ is required.
|
||||
- If using Doom's modules, 28.1+ is required.
|
||||
- Tree-sitter support requires 29.1+, but much improved in 30.1+.
|
||||
- If using Doom's modules (especially tree-sitter support), 29.1+ is
|
||||
required.
|
||||
- Git >= 2.23
|
||||
- [ripgrep] >= 11.0
|
||||
- **Optional, but recommended:**
|
||||
|
|
|
|||
|
|
@ -150,10 +150,6 @@ if it's callable, `apropos' otherwise."
|
|||
#'helpful-at-point
|
||||
#'describe-symbol)))))
|
||||
|
||||
;; DEPRECATED: Remove when 28 support is dropped.
|
||||
(unless (fboundp 'lisp--local-defform-body-p)
|
||||
(fset 'lisp--local-defform-body-p #'ignore))
|
||||
|
||||
|
||||
;;
|
||||
;;; Commands
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
;;; lang/python/autoload/compat-28.1.el -*- lexical-binding: t; -*-
|
||||
;;;###if (versionp! "28.0" <= emacs-version <= "28.1")
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; HACK: 28.1 introduced breakage into the syntax highlighter for `python-mode'.
|
||||
;; The fix was introduced shortly after, but did not make the 28.1 release.
|
||||
;; This fix exists solely to patch that issue for 28.1 users.
|
||||
;;
|
||||
;; DEPRECATED: Remove when 28.1 support is dropped
|
||||
;;
|
||||
;;; Code:
|
||||
|
||||
;;;###autoload
|
||||
(defadvice! +python--font-lock-assignment-matcher-a (regexp)
|
||||
:override #'python-font-lock-assignment-matcher
|
||||
(lambda (limit)
|
||||
(cl-loop while (re-search-forward regexp limit t)
|
||||
unless (or (python-syntax-context 'paren)
|
||||
(equal (char-after) ?=))
|
||||
return t)))
|
||||
|
||||
;;;###autoload
|
||||
(defadvice! +python--rx-a (&rest regexps)
|
||||
:override #'python-rx
|
||||
`(rx-let ((block-start (seq symbol-start
|
||||
(or "def" "class" "if" "elif" "else" "try"
|
||||
"except" "finally" "for" "while" "with"
|
||||
;; Python 3.5+ PEP492
|
||||
(and "async" (+ space)
|
||||
(or "def" "for" "with")))
|
||||
symbol-end))
|
||||
(dedenter (seq symbol-start
|
||||
(or "elif" "else" "except" "finally")
|
||||
symbol-end))
|
||||
(block-ender (seq symbol-start
|
||||
(or
|
||||
"break" "continue" "pass" "raise" "return")
|
||||
symbol-end))
|
||||
(decorator (seq line-start (* space) ?@ (any letter ?_)
|
||||
(* (any word ?_))))
|
||||
(defun (seq symbol-start
|
||||
(or "def" "class"
|
||||
;; Python 3.5+ PEP492
|
||||
(and "async" (+ space) "def"))
|
||||
symbol-end))
|
||||
(if-name-main (seq line-start "if" (+ space) "__name__"
|
||||
(+ space) "==" (+ space)
|
||||
(any ?' ?\") "__main__" (any ?' ?\")
|
||||
(* space) ?:))
|
||||
(symbol-name (seq (any letter ?_) (* (any word ?_))))
|
||||
(assignment-target (seq (? ?*)
|
||||
(* symbol-name ?.) symbol-name
|
||||
(? ?\[ (+ (not ?\])) ?\])))
|
||||
(grouped-assignment-target (seq (? ?*)
|
||||
(* symbol-name ?.) (group symbol-name)
|
||||
(? ?\[ (+ (not ?\])) ?\])))
|
||||
(open-paren (or "{" "[" "("))
|
||||
(close-paren (or "}" "]" ")"))
|
||||
(simple-operator (any ?+ ?- ?/ ?& ?^ ?~ ?| ?* ?< ?> ?= ?%))
|
||||
(not-simple-operator (not (or simple-operator ?\n)))
|
||||
(operator (or "==" ">=" "is" "not"
|
||||
"**" "//" "<<" ">>" "<=" "!="
|
||||
"+" "-" "/" "&" "^" "~" "|" "*" "<" ">"
|
||||
"=" "%"))
|
||||
(assignment-operator (or "+=" "-=" "*=" "/=" "//=" "%=" "**="
|
||||
">>=" "<<=" "&=" "^=" "|="
|
||||
"="))
|
||||
(string-delimiter (seq
|
||||
;; Match even number of backslashes.
|
||||
(or (not (any ?\\ ?\' ?\")) point
|
||||
;; Quotes might be preceded by an
|
||||
;; escaped quote.
|
||||
(and (or (not (any ?\\)) point) ?\\
|
||||
(* ?\\ ?\\) (any ?\' ?\")))
|
||||
(* ?\\ ?\\)
|
||||
;; Match single or triple quotes of any kind.
|
||||
(group (or "\"\"\"" "\"" "'''" "'"))))
|
||||
(coding-cookie (seq line-start ?# (* space)
|
||||
(or
|
||||
;; # coding=<encoding name>
|
||||
(: "coding" (or ?: ?=) (* space)
|
||||
(group-n 1 (+ (or word ?-))))
|
||||
;; # -*- coding: <encoding name> -*-
|
||||
(: "-*-" (* space) "coding:" (* space)
|
||||
(group-n 1 (+ (or word ?-)))
|
||||
(* space) "-*-")
|
||||
;; # vim: set fileencoding=<encoding name> :
|
||||
(: "vim:" (* space) "set" (+ space)
|
||||
"fileencoding" (* space) ?= (* space)
|
||||
(group-n 1 (+ (or word ?-)))
|
||||
(* space) ":")))))
|
||||
(rx ,@regexps)))
|
||||
|
||||
;;; compat-28.1.el ends here
|
||||
|
|
@ -14,7 +14,6 @@ This module provides extra functionality for macOS.
|
|||
|
||||
** Packages
|
||||
- [[doom-package:ns-auto-titlebar]]
|
||||
- [[doom-package:osx-trash]]
|
||||
|
||||
** Hacks
|
||||
/No hacks documented for this module./
|
||||
|
|
|
|||
|
|
@ -35,21 +35,3 @@
|
|||
;; Delete files to trash on macOS, as an extra layer of precaution against
|
||||
;; accidentally deleting wanted files.
|
||||
(setq delete-by-moving-to-trash (not noninteractive))
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! osx-trash
|
||||
;; DEPRECATED: Not needed on Emacs 29+. Remove when dropping 28 support.
|
||||
;; Fixed by https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21340.
|
||||
:when (< emacs-major-version 29)
|
||||
:commands osx-trash-move-file-to-trash
|
||||
:init
|
||||
;; Lazy load `osx-trash'
|
||||
(when (not (fboundp 'system-move-file-to-trash))
|
||||
(defun system-move-file-to-trash (file)
|
||||
"Move FILE to trash."
|
||||
(when (and (not (featurep :system 'linux))
|
||||
(not (file-remote-p default-directory)))
|
||||
(osx-trash-move-file-to-trash file)))))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; os/macos/packages.el
|
||||
|
||||
(when (< emacs-major-version 29)
|
||||
(package! osx-trash :pin "90f0c99206022fec646206018fcd63d9d2e57325"))
|
||||
(package! ns-auto-titlebar :pin "1205ac67b76b58e9eb53d2115b85775533653a80")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue