From ba41a183dd5123130a0393b84658ec3f2fdd66f4 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Tue, 29 Dec 2020 11:39:04 +0100 Subject: [PATCH] * lisp/emacs-lisp/comp-cstr.el (comp-cstr): Better `comp-type-to-cstr'. --- lisp/emacs-lisp/comp-cstr.el | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index 57d93912d2f..8a8e22e030d 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -49,7 +49,16 @@ "Likewise like `cl--all-builtin-types' but with t as common supertype.") (cl-defstruct (comp-cstr (:constructor comp-type-to-cstr - (type &aux (typeset (list type)))) + (type &aux + (null (eq type 'null)) + (integer (eq type 'integer)) + (typeset (if (or null integer) + nil + (list type))) + (valset (when null + '(nil))) + (range (when integer + '((- . +)))))) (:constructor comp-value-to-cstr (value &aux (valset (list value)) -- 2.39.5