From 7d6be88c8664de35f506aac960a6c11225599b6b Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Wed, 2 Apr 2025 09:09:14 +0200 Subject: Simplify version comparisons --- compat-tests.el | 4 ++-- compat.el | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compat-tests.el b/compat-tests.el index 5f90d58..5d70ac5 100644 --- a/compat-tests.el +++ b/compat-tests.el @@ -2166,7 +2166,7 @@ (should-not (string-search (compat-tests--string-to-multibyte "\370") (compat-tests--string-to-multibyte "\303\270"))) (should-equal 3 (string-search "\303\270" "foo\303\270")) - (when (version<= "27" emacs-version) + (when (<= 27 emacs-major-version) ;; FIXME The commit a1f76adfb03c23bb4242928e8efe6193c301f0c1 in ;; emacs.git fixes the behaviour of regular expressions matching ;; raw bytes. The compatibility functions should updated to @@ -2196,7 +2196,7 @@ (should-equal "labarbarbarzot" (string-replace "fo" "bar" "lafofofozot")) (should-equal "axb" (string-replace "\377" "x" "a\377b")) (should-equal "axø" (string-replace "\377" "x" "a\377ø")) - (when (version<= "27" emacs-version) + (when (<= 27 emacs-major-version) ;; FIXME The commit a1f76adfb03c23bb4242928e8efe6193c301f0c1 ;; in emacs.git fixes the behaviour of regular ;; expressions matching raw bytes. The compatibility diff --git a/compat.el b/compat.el index b5577e4..1693871 100644 --- a/compat.el +++ b/compat.el @@ -50,7 +50,7 @@ ;; time and runtime, but only if needed. (eval-when-compile (defmacro compat--maybe-require () - (when (version< emacs-version "31.0.50") + (when (< emacs-major-version 31) (require 'compat-31) '(require 'compat-31)))) (compat--maybe-require) -- cgit v1.0