Commit 65e4ebdf authored by Philippe Schnoebelen's avatar Philippe Schnoebelen Committed by Eli Zaretskii

Support bool-vectors in cl-extra.el

* lisp/emacs-lisp/cl-extra.el (cl-coerce): Support bool-vector.

Copyright-paperwork-exempt: yes
parent 721035d6
Pipeline #2802 failed with stage
in 63 minutes and 41 seconds
......@@ -48,6 +48,8 @@ TYPE is a Common Lisp type specifier.
\n(fn OBJECT TYPE)"
(cond ((eq type 'list) (if (listp x) x (append x nil)))
((eq type 'vector) (if (vectorp x) x (vconcat x)))
((eq type 'bool-vector)
(if (bool-vector-p x) x (apply #'bool-vector (cl-coerce x 'list))))
((eq type 'string) (if (stringp x) x (concat x)))
((eq type 'array) (if (arrayp x) x (vconcat x)))
((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment