[Sbcl-help] dotted arglists for macros

23 views
Skip to first unread message

Don Cohen

unread,
May 19, 2021, 2:00:55 PM5/19/21
to sbcl...@lists.sourceforge.net

It looks to me like this is explicitly allowed by the common lisp spec:

0] (defmacro m(&rest y) (list 'quote y))

M
0] (macroexpand '(m . abc))

'ABC
T
0] (defun f()(m . abc))
; in: DEFUN F
; (AP5::M . AP5::ABC)
;
; caught ERROR:
; (M . ABC) is not a proper list.
;
; compilation unit finished
; caught 1 ERROR condition
F
0]

Am I missing something?


_______________________________________________
Sbcl-help mailing list
Sbcl...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-help

Douglas Katzman via Sbcl-help

unread,
May 19, 2021, 2:09:56 PM5/19/21
to Don Cohen, SBCL help
Indeed, the compiler has a test for proper-list-p that is too eager. It needs to do that only after seeing that the form is not a macro.
Reply all
Reply to author
Forward
0 new messages