From 65e4ebdfb6e78abac68ba9b9422fa6cd77028c16 Mon Sep 17 00:00:00 2001 From: Philippe Schnoebelen Date: Sun, 28 Jul 2019 08:59:12 +0200 Subject: [PATCH] Support bool-vectors in cl-extra.el * lisp/emacs-lisp/cl-extra.el (cl-coerce): Support bool-vector. Copyright-paperwork-exempt: yes --- lisp/emacs-lisp/cl-extra.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 4dc2e9de58f..3a6def733f3 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -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)) -- 2.39.2