From e0ed957c2f6e71e190659b5e1b08a6b466667d4d Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Wed, 24 May 2023 11:05:57 +0200 Subject: compat-macs--defun: Fix new Emacs 30 bytecompiler warnings --- compat-macs.el | 7 +++---- 1 file 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)) -- cgit v1.0