emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/compat f4c0979 92/99: Prevent shadowing declarations in


From: ELPA Syncer
Subject: [elpa] externals/compat f4c0979 92/99: Prevent shadowing declarations in functional compatibility code
Date: Sun, 17 Oct 2021 05:58:03 -0400 (EDT)

branch: externals/compat
commit f4c0979e411bf572fab9b071fc7584bb98a1feec
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Prevent shadowing declarations in functional compatibility code
    
    Previously the advice check inserted a redundant nil at the beginning
    of every function or macro definition. This prevented defun/defmacro
    from parsing any declare hints.
---
 compat-macs.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index 41dc3da..f8d0c65 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -145,9 +145,9 @@ attributes (see `compat-generate-common')."
          ;; Advice may use the implicit variable `oldfun', but
          ;; to avoid triggering the byte compiler, we make
          ;; sure the argument is used at least once.
-         ,(and (eq type 'advice) '(ignore oldfun))
-         ;; Insert the actual body now.
-         ,@body))
+         ,@(if (eq type 'advice)
+               (cons '(ignore oldfun) body)
+             body)))
      (lambda (realname version)
        (cond
         ((memq type '(func macro))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]