diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index ca33c56a95..117c991ffe 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -47,6 +47,7 @@ cl-coerce TYPE is a Common Lisp type specifier. \n(fn OBJECT TYPE)" (cond ((eq type 'list) (if (listp x) x (append x nil))) + ((eq type 'bool-vector) (if (bool-vector-p x) x (apply #'bool-vector (cl-coerce x 'list)))) ((eq type 'vector) (if (vectorp x) x (vconcat x))) ((eq type 'string) (if (stringp x) x (concat x))) ((eq type 'array) (if (arrayp x) x (vconcat x)))