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))
This commit is contained in:
Henrik Lissner 2021-10-20 18:19:31 +02:00
parent 8f040b79be
commit b35b32273a

View file

@ -54,7 +54,7 @@ list is returned as-is."
(defun doom-enlist (exp) (defun doom-enlist (exp)
"Return EXP wrapped in a list, or as-is if already a list." "Return EXP wrapped in a list, or as-is if already a list."
(declare (pure t) (side-effect-free t)) (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) (defun doom-keyword-intern (str)
"Converts STR (a string) into a keyword (`keywordp')." "Converts STR (a string) into a keyword (`keywordp')."