diff options
| author | Philip Kaludercic <philipk@posteo.net> | 2023-05-21 09:58:55 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-05-24 11:07:58 +0200 |
| commit | bad9e4848882f2706a4a8c003601fd66e4da55d1 (patch) | |
| tree | 4baca589e37e9f9ac178291cb16e691c268e416a | |
| parent | e0ed957c2f6e71e190659b5e1b08a6b466667d4d (diff) | |
Prepare support for Emacs 30
| -rw-r--r-- | Makefile | 1 | ||||
| -rw-r--r-- | compat-30.el | 30 | ||||
| -rw-r--r-- | compat-tests.el | 2 | ||||
| -rw-r--r-- | compat.el | 11 |
4 files changed, 37 insertions, 7 deletions
@@ -9,6 +9,7 @@ BYTEC = compat-25.elc \ compat-27.elc \ compat-28.elc \ compat-29.elc \ + compat-30.elc \ compat.elc \ compat-macs.elc \ compat-tests.elc diff --git a/compat-30.el b/compat-30.el new file mode 100644 index 0000000..3967c40 --- /dev/null +++ b/compat-30.el @@ -0,0 +1,30 @@ +;;; compat-30.el --- Functionality added in Emacs 30 -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 Free Software Foundation, Inc. + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +;;; Commentary: + +;; Functionality added in Emacs 30, needed by older Emacs versions. + +;;; Code: + +(eval-when-compile (load "compat-macs.el" nil t t)) +(compat-require compat-29 "29.1") + + + +(provide 'compat-30) +;;; compat-30.el ends here diff --git a/compat-tests.el b/compat-tests.el index 60e652b..060c9ca 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -81,7 +81,7 @@ (ert-deftest compat-loaded-features () (let ((version 0)) - (while (< version 30) + (while (< version 31) (should-equal (> version emacs-major-version) (featurep (intern (format "compat-%s" version)))) (setq version (1+ version))))) @@ -49,12 +49,11 @@ ;; Ensure that the newest compatibility layer is required at compile ;; time and runtime, but only if needed. (eval-when-compile - (defmacro compat--maybe-require-29 () - ;; TODO Update to 29.1 as soon as the Emacs emacs-29 branch version bumped - (when (version< emacs-version "29.0.90") - (require 'compat-29) - '(require 'compat-29)))) -(compat--maybe-require-29) + (defmacro compat--maybe-require-30 () + (when (version< emacs-version "30.0.50") + (require 'compat-30) + '(require 'compat-30)))) +(compat--maybe-require-30) ;;;; Macros for extended compatibility function calls |
