4 (:shadow cl
:if cl
:defun
)
5 (:export
#:if
#:defun
))
9 (defmacro if
(test pass
&rest else
)
10 "Elisp version of IF."
17 (cl:defun
parse-interactive (thing)
18 (error "unimplemented parse-interactive"))
20 (defmacro defun
(name lambda-list
&body body
)
21 "Parse an elisp style defun and convert it to a cl defun or lice defcommand."
22 (let ((doc (when (stringp (car body
))
24 (decls (loop while
(eq (caar body
) 'declare
)
26 (interactive (when (and (listp (car body
))
27 (eq (caar body
) 'interactive
))
30 `(defcommand ,name
(,lambda-list
31 ,@(parse-interactive (cdr interactive
)))
32 ,@(append (list doc
) decls body
))
33 `(cl:defun
,name
,@(append (list doc
) decls body
)))))