From 8f040b79be27ba001b82134dc6177b6c16ad8697 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 19 Oct 2021 22:29:08 +0200 Subject: [PATCH] fix(lib): fn! error when arglist is a cons cell Throws a wrong-type-argument error when fn! is given a cons cell in its arguments, e.g. (fn! ((x . y)) ...) --- core/core-lib.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/core-lib.el b/core/core-lib.el index f9989d07d..16d6bc46f 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -321,9 +321,9 @@ ARGLIST." ,(letf! (defun* allow-other-keys (args) (mapcar (lambda (arg) - (if (listp arg) - (allow-other-keys arg) - arg)) + (cond ((nlistp (cdr-safe arg)) arg) + ((listp arg) (allow-other-keys arg)) + (arg))) (if (and (memq '&key args) (not (memq '&allow-other-keys args))) (if (memq '&aux args)