[slime-cvs] CVS slime
CVS User trittweiler
trittweiler at common-lisp.net
Sat Sep 18 09:34:06 UTC 2010
Update of /project/slime/cvsroot/slime
In directory cl-net:/tmp/cvs-serv28015
Modified Files:
ChangeLog swank-backend.lisp
Log Message:
* swank-backend.lisp (valid-function-name-p): New interface.
(compiler-macroexpand-1): Use it to guard against type errors
from COMPILER-MACRO-FUNCTION.
* swank-arglist.lisp (function-exists-p): Renamed from
FUNCTION-EXISTS-P. Uses new SWANK-BACKEND:VALID-FUNCTION-NAME-P
underneath.
(valid-operator-name-p): Unused, hence deleted.
(boundp-and-interesting): Renamed from INTERESTING-VARIABLE-P.
--- /project/slime/cvsroot/slime/ChangeLog 2010/09/18 09:01:39 1.2140
+++ /project/slime/cvsroot/slime/ChangeLog 2010/09/18 09:34:05 1.2141
@@ -1,5 +1,11 @@
2010-09-18 Tobias C. Rittweiler <tcr at freebits.de>
+ * swank-backend.lisp (valid-function-name-p): New interface.
+ (compiler-macroexpand-1): Use it to guard against type errors
+ from COMPILER-MACRO-FUNCTION.
+
+2010-09-18 Tobias C. Rittweiler <tcr at freebits.de>
+
* swank.lisp (before-init): push :SWANK to *FEATURES*. (lp#627313)
2010-09-18 Tobias C. Rittweiler <tcr at freebits.de>
@@ -14,8 +20,8 @@
(slime-compiler-macroexpand): Thus deleted.
(slime-compiler-macroexpand-inplace): Ditto.
- * swank.lisp (swank-macro/compiler-macro-expand-1): New interface.
- (swank-macro/compiler-macro-expand): New interface.
+ * swank.lisp (swank-macro/compiler-macro-expand-1): New defslimefun.
+ (swank-macro/compiler-macro-expand): New defslimefun.
(macro/compiler-macro-expand-1): New.
(macro/compiler-macro-expand): New.
(expand-repeatedly): New helper.
--- /project/slime/cvsroot/slime/swank-backend.lisp 2010/08/21 06:39:59 1.200
+++ /project/slime/cvsroot/slime/swank-backend.lisp 2010/09/18 09:34:05 1.201
@@ -603,6 +603,15 @@
(declare (ignore function))
nil)
+(definterface valid-function-name-p (form)
+ "Is FORM syntactically valid to name a function?
+ If true, FBOUNDP should not signal a type-error for FORM."
+ (flet ((length=2 (list)
+ (and (not (null (cdr list))) (null (cddr list)))))
+ (or (symbolp form)
+ (and (consp form) (length=2 form)
+ (eq (first form) 'setf) (symbolp (second form))))))
+
(definterface macroexpand-all (form)
"Recursively expand all macros in FORM.
Return the resulting form.")
@@ -613,7 +622,9 @@
defined, invoke the expander function using *macroexpand-hook* and
return the results and T. Otherwise, return the original form and
NIL."
- (let ((fun (and (consp form) (compiler-macro-function (car form)))))
+ (let ((fun (and (consp form)
+ (valid-function-name-p (car form))
+ (compiler-macro-function (car form)))))
(if fun
(let ((result (funcall *macroexpand-hook* fun form env)))
(values result (not (eq result form))))
More information about the slime-cvs
mailing list