diff options
Diffstat (limited to 'compat-macs.el')
| -rw-r--r-- | compat-macs.el | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compat-macs.el b/compat-macs.el index f34cb0d..6c6e220 100644 --- a/compat-macs.el +++ b/compat-macs.el @@ -110,10 +110,9 @@ REST are attributes and the function BODY." ;; Remove unsupported declares. 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 (<= emacs-major-version 25) - (delq (assq 'side-effect-free (car body)) (car body)) - (delq (assq 'pure (car body)) (car body)))) + (when (and (listp (car-safe body)) (eq (caar body) 'declare) (<= emacs-major-version 25)) + (setcar body (assq-delete-all 'pure (assq-delete-all + 'side-effect-free (car body))))) ;; Use `:extended' name if the function is already defined. (let* ((defname (if (and extended (fboundp name)) (intern (format "compat--%s" name)) |
