3 ms·
As far as I can tell, any Elisp if-form that is also a valid Common Lisp if-form has the same semantics; but Elisp allows more than one else-form in its syntax,
by kazinator 4y ago
As far as I can tell, any Elisp if-form that is also a valid Common Lisp if-form has the same semantics; but Elisp allows more than one else-form in its syntax, with additional semantics.
It's something like:
(defmacro elisp-if (expr then &rest elses)
`(cond (,expr ,then) (t ,@elses)))
Whereas the regular if is like:
(defmacro cl-if (expr then &optional else)
`(cond (,expr ,then) (t ,else)))
In a book that uses Common Lisp, you shouldn't see an if-form that isn't Elisp-compatible.
- math-dev 4y agoOh yes you are 100% right, I just had a brain fart. Thanks for correcting