aboutsummaryrefslogtreecommitdiff
path: root/compat-macs.el
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2022-02-05 17:00:23 +0100
committerPhilip Kaludercic <philipk@posteo.net>2022-02-05 17:02:02 +0100
commit0039912d8ea1cd3e880421876664ddd491fb69be (patch)
tree539f13c9b17f9f229cb0beb443388d211e46f190 /compat-macs.el
parent839ed32445aea21808418e2084280f1d49b2eb1c (diff)
Remove unknown declare properties for Emacs 24 and prior
Diffstat (limited to 'compat-macs.el')
-rw-r--r--compat-macs.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/compat-macs.el b/compat-macs.el
index b2e8612..f6819fc 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -116,6 +116,12 @@ attributes (see `compat-generate-common')."
(let ((body rest))
(while (keywordp (car body))
(setq body (cddr body)))
+ ;; It might be possible to set these properties otherwise. That
+ ;; should be looked into and implemented if it is the case.
+ (when (and (listp (car-safe body)) (eq (caar body) 'declare))
+ (when (version<= "25" emacs-version)
+ (delq (assq 'side-effect-free (car body)) (car body))
+ (delq (assq 'pure (car body)) (car body))))
(compat-generate-common
name
(lambda (realname version)