[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/consult acf8ab2c0c 2/2: Use static-if
From: |
ELPA Syncer |
Subject: |
[elpa] externals/consult acf8ab2c0c 2/2: Use static-if |
Date: |
Mon, 8 Jul 2024 18:57:50 -0400 (EDT) |
branch: externals/consult
commit acf8ab2c0ce7226e599ad6d564d88dd282574b09
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Use static-if
---
consult-kmacro.el | 4 ++--
consult.el | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/consult-kmacro.el b/consult-kmacro.el
index 3e3418507c..240db685d3 100644
--- a/consult-kmacro.el
+++ b/consult-kmacro.el
@@ -38,7 +38,7 @@
;; Emacs 29 uses OClosures. I like OClosures but it would have been better
;; if public APIs wouldn't change like that.
(mapcar (lambda (x)
- (if (eval-when-compile (> emacs-major-version 28))
+ (static-if (> emacs-major-version 28)
(list (kmacro--keys x) (kmacro--counter x) (kmacro--format
x) x)
`(,@x ,x))))
;; Filter mouse clicks
@@ -81,7 +81,7 @@ Macros containing mouse clicks are omitted."
(get-text-property 0 'consult-kmacro--annotation cand))
:lookup #'consult--lookup-candidate)))
;; Kmacros are lambdas (oclosures) on Emacs 29
- (funcall (if (eval-when-compile (> emacs-major-version 28))
+ (funcall (static-if (> emacs-major-version 28)
km
(kmacro-lambda-form km))
arg)))
diff --git a/consult.el b/consult.el
index 0f7ef2f18a..17b33cdb92 100644
--- a/consult.el
+++ b/consult.el
@@ -1274,7 +1274,7 @@ Return the location marker."
;; `find-file-hook' ending with `-check-buffers'. This has
been
;; changed in Emacs 30. Now a `change-major-mode-hook' is used
;; instead with the suffix `-check-buffers'.
- (suffix (if (eval-when-compile (>= emacs-major-version 30))
+ (suffix (static-if (>= emacs-major-version 30)
"-enable-in-buffer"
"-check-buffers"))
((string-suffix-p suffix name)))