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

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

[elpa] externals/compat 4d3d0bf680 08/10: Fix duplicate definition testi


From: ELPA Syncer
Subject: [elpa] externals/compat 4d3d0bf680 08/10: Fix duplicate definition testing checking
Date: Mon, 28 Feb 2022 03:57:33 -0500 (EST)

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

    Fix duplicate definition testing checking
---
 compat-macs.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/compat-macs.el b/compat-macs.el
index d487627a67..35d0b55b8e 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -149,8 +149,10 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
          (realname (or (plist-get attr :realname)
                        (intern (format "compat--%S" name))))
          (body `(progn
-                  (when (get ',name 'compat-def)
-                    (error "Duplicate compatibility definition: %s" ',name))
+                  (unless (or (null (get ',name 'compat-def))
+                              (eq (get ',name 'compat-def) ',realname))
+                    (error "Duplicate compatibility definition: %s (was %s, 
now %s)"
+                           ',name (get ',name 'compat-def) ',realname))
                   (put ',name 'compat-def ',realname)
                   ,(funcall install-fn realname version))))
     `(progn



reply via email to

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