aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2025-04-02 09:09:14 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2025-04-02 09:09:23 +0200
commit7d6be88c8664de35f506aac960a6c11225599b6b (patch)
tree2c30530e541cad94434bc7ad55e718e456d2a6d9
parent47a7045ef4043dd428fc9f191d5e08c321c7b87f (diff)
Simplify version comparisons
-rw-r--r--compat-tests.el4
-rw-r--r--compat.el2
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)