diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2023-05-24 11:05:57 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2023-05-24 11:05:57 +0200 |
| commit | e0ed957c2f6e71e190659b5e1b08a6b466667d4d (patch) | |
| tree | 9852ed1b2428a16796a5120e8defbd35beed3573 | |
| parent | 97726c2cf7ee05b88345831742560764dad8e9d0 (diff) | |
compat-macs--defun: Fix new Emacs 30 bytecompiler warnings
| -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)) |
