diff --git a/init.el b/init.el index 49be2903..01987240 100644 --- a/init.el +++ b/init.el @@ -13,9 +13,9 @@ ;; the startup time. (setq gc-cons-threshold 100000000) -(let ((min-version "27.1")) +(let ((min-version "28")) (when (version< emacs-version min-version) - (error "This config requires at least Emacs %s, but you're running %s" + (error "This config requires at least Emacs-%s, but you're running %s" min-version emacs-version))) (setq initial-scratch-message @@ -140,7 +140,7 @@ melpa-stable.") ;; Bind this early, and only if it has not been bound already, ;; so customisation from other places (i.e., before-init files) ;; are not overwritten. -(unless (boundp 'package-install-upgrade-built-in) +(unless (boundp 'package-install-upgrade-built-in) ;; since Emacs-29 (setq package-install-upgrade-built-in t)) ;; Load before init files @@ -172,7 +172,7 @@ melpa-stable.") (setq package-user-dir (locate-user-emacs-file (concat "elpa-" emacs-version))) -(when (fboundp 'native-comp-available-p) ;; check needed before Emacs-28 +(when (fboundp 'native-comp-available-p) (setq package-native-compile (native-comp-available-p))) (package-initialize) @@ -426,7 +426,7 @@ after it's been byte compiled." (exordium-require 'init-dired) ; enable dired+ and wdired permission editing (exordium-require 'init-git) ; Magit and git gutter (exordium-require 'init-git-visit-diffs) ; visit diffs in successive narrowed buffers -(when (version< "29.1" emacs-version) +(when (version< "29" emacs-version) (exordium-require 'init-forge)) ; Forge (exordium-require 'init-flb-mode) ; frame-local buffers diff --git a/modules/init-company.el b/modules/init-company.el index 7e778a12..99cd2aa2 100644 --- a/modules/init-company.el +++ b/modules/init-company.el @@ -9,7 +9,7 @@ (load (file-name-concat (locate-user-emacs-file "modules") "init-require")))) (exordium-require 'init-prefs) -(when (version< "29.1" emacs-version) +(when (version< "29" emacs-version) (exordium-require 'init-forge)) (eval-when-compile @@ -42,7 +42,7 @@ (use-package company :diminish "CA" - :if (version< "29.1" emacs-version) + :if (version< "29" emacs-version) :defer t :commands (company-begin-backend) :init diff --git a/modules/init-docker.el b/modules/init-docker.el index 9e9e7f20..b084060b 100644 --- a/modules/init-docker.el +++ b/modules/init-docker.el @@ -13,7 +13,7 @@ :custom (docker-use-sudo nil)) -(when (version< emacs-version "29") +(when (version< emacs-version "29") (use-package docker-tramp :after docker :defer t)) diff --git a/modules/init-font-lock.el b/modules/init-font-lock.el index 6539ffe4..3a035e81 100644 --- a/modules/init-font-lock.el +++ b/modules/init-font-lock.el @@ -17,24 +17,13 @@ (c-mode . t) (C++-mode . 1) ;; t or 1 or 2 (t . t))) - ;; - ;; Lazy font-lock to avoid the bug in Emacs 24 - (cond ((fboundp 'jit-lock-mode) - (setq jit-lock-chunk-size 5000 - jit-lock-context-time 0.2 - jit-lock-defer-time .1 - jit-lock-stealth-nice 0.2 - jit-lock-stealth-time 5 - jit-lock-stealth-verbose nil) - (jit-lock-mode t)) - ((fboundp 'turn-on-lazy-shot) ; before Emacs-29 - (add-hook 'font-lock-mode-hook #'turn-on-lazy-shot)) - ((fboundp 'turn-on-lazy-lock) ; before Emacs-29 - (add-hook 'font-lock-mode-hook #'turn-on-lazy-lock) - (defvar lazy-lock-stealth-time) - (setq lazy-lock-stealth-time 10) - (defvar lazy-lock-minimum-size) - (setq lazy-lock-minimum-size 10000)))) + (setq jit-lock-chunk-size 5000 + jit-lock-context-time 0.2 + jit-lock-defer-time .1 + jit-lock-stealth-nice 0.2 + jit-lock-stealth-time 5 + jit-lock-stealth-verbose nil) + (jit-lock-mode t)) (t ;; Disable font lock completely. (global-font-lock-mode -1))) diff --git a/modules/init-forge.t.el b/modules/init-forge.t.el index 6c4ae5d3..724b9ae5 100644 --- a/modules/init-forge.t.el +++ b/modules/init-forge.t.el @@ -11,7 +11,7 @@ (require 'ert) (require 'cl-lib) -(when (version< "29.1" emacs-version) +(when (version< "29" emacs-version) (eval-when-compile (unless (featurep 'init-require) @@ -74,7 +74,7 @@ (exordium-forge-cleanup-known-repositories--concat to-delete))))) -) ;; (version< "29.1" emacs-version) +) ;; (version< "29" emacs-version) (provide 'init-forge.t) diff --git a/modules/init-util.el b/modules/init-util.el index 8ccee337..39bbdb78 100644 --- a/modules/init-util.el +++ b/modules/init-util.el @@ -534,10 +534,9 @@ Otherwise escape quotes in the inner string (rationalising escaping)." (save-restriction (widen) (save-excursion - ;; Starting with emacs-28 python strings are split when using a generic - ;; string delimeter: first and last two quotes are a separate sexp, and - ;; the `forward-sexp' only works from the most inner quote. However, - ;; in emacs-27, the `forward-sexp' works only from the most outer quote. + ;; Python strings are split on a generic string delimeter: first and last + ;; two quotes are a separate sexp, and the `forward-sexp' only works from + ;; the most inner quote. (when-let* ((orig-start (if (region-active-p) (let* ((pt (min (region-beginning) (region-end))) @@ -569,13 +568,9 @@ Otherwise escape quotes in the inner string (rationalising escaping)." pt)) (save-excursion (goto-char orig-start) - (forward-char (if (version< emacs-version "28") - 0 - (logand quote-length 2))) + (forward-char (logand quote-length 2)) (forward-sexp) - (forward-char (if (version< emacs-version "28") - 0 - (logand quote-length 2))) + (forward-char (logand quote-length 2)) (point))))) (goto-char orig-start) (delete-char quote-length)