In cl-case
clauses (though naturally not the initial keyform), keys are apparently quoted:
(let ((mark ?.))
(case mark
(mark 'mark)
(?. ?.))) ; 46 (?.)
(let ((mark ?.))
(case 'mark
(mark 'mark)
(?. ?.))) ; mark
My reading of neither the cl-lib manual nor CLHS entry for case
describe this behavior. Is this the intended behavior of cl-case
? If so, is this behavior documented? Is there a succinct way to match the keyform against a variable in a cl-case
(as opposed to using a cond
)?
cond
, why not usepcase
? – Basil Jan 7 at 15:42conditionals
covers that. Just like the specific tagelisp-macros
is appropriate for a question about Elisp macros. – Drew Jan 8 at 4:22