branch: externals/compat
commit 999ef2a730fb2d2a633c7a86c4e012fadc1b66cc
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>

    Raise an error if the realname would be the same as the name
---
 compat-macs.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compat-macs.el b/compat-macs.el
index c6417c8379..cfd5d27600 100644
--- a/compat-macs.el
+++ b/compat-macs.el
@@ -119,6 +119,8 @@ DEF-FN, INSTALL-FN, CHECK-FN, ATTR and TYPE."
                   '(compat--ignore))
                  (`(when (and ,(if cond cond t)
                               ,(funcall check-fn)))))))
+    (when (eq name realname)
+      (error "%S: Name is equal to realname" name))
     (cond
      ((and (plist-get attr :prefix) (memq type '(func macro))
            (string-match "\\`compat-\\(.+\\)\\'" (symbol-name name))

Reply via email to