From b35b32273a1c1601804d16c9d485244ebdc40ca2 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 20 Oct 2021 18:19:31 +0200 Subject: [PATCH] fix(lib): doom-enlist not wrapping cons cells While lists are technically cons cells, cons cells don't have all the properties of lists, so doom-enlist shouldn't treat it as one. Before: (doom-enlist '(a . b)) #=> (a . b) After: (doom-enlist '(a . b)) #=> ((a . b)) --- core/core-lib.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/core-lib.el b/core/core-lib.el index 16d6bc46f..4ec91b979 100644 --- a/core/core-lib.el +++ b/core/core-lib.el @@ -54,7 +54,7 @@ list is returned as-is." (defun doom-enlist (exp) "Return EXP wrapped in a list, or as-is if already a list." (declare (pure t) (side-effect-free t)) - (if (listp exp) exp (list exp))) + (if (proper-list-p exp) exp (list exp))) (defun doom-keyword-intern (str) "Converts STR (a string) into a keyword (`keywordp')."