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

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

[elpa] externals/compat 29dc297 98/99: Ensure that compat-maxargs-/= is


From: ELPA Syncer
Subject: [elpa] externals/compat 29dc297 98/99: Ensure that compat-maxargs-/= is visible at compile time
Date: Sun, 17 Oct 2021 05:58:04 -0400 (EDT)

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

    Ensure that compat-maxargs-/= is visible at compile time
---
 compat.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/compat.el b/compat.el
index 16f56a3..79a2c92 100644
--- a/compat.el
+++ b/compat.el
@@ -134,11 +134,12 @@ advice."
     (compat-func-arity func))
    ((signal 'invalid-function func))))
 
-(defun compat-maxargs-/= (func n)
-  "Non-nil when FUNC doesn't accept at most N arguments."
-  (condition-case nil
-      (not (eq (cdr (compat-func-arity func t)) n))
-    (void-function t)))
+(eval-and-compile
+  (defun compat-maxargs-/= (func n)
+    "Non-nil when FUNC doesn't accept at most N arguments."
+    (condition-case nil
+        (not (eq (cdr (compat-func-arity func t)) n))
+      (void-function t))))
 
 ;; Suppress errors triggered by requiring non-existent libraries in
 ;; older versions of Emacs (e.g. subr-x).



reply via email to

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