[movitz-cvs] CVS movitz/ide

ffjeld ffjeld at common-lisp.net
Sat Mar 3 18:34:53 UTC 2007


Update of /project/movitz/cvsroot/movitz/ide
In directory clnet:/tmp/cvs-serv32752

Modified Files:
	ide.lisp 
Log Message:
More complete ide: movitz-arglist, macroexpand, etc.


--- /project/movitz/cvsroot/movitz/ide/ide.lisp	2007/03/01 17:52:57	1.4
+++ /project/movitz/cvsroot/movitz/ide/ide.lisp	2007/03/03 18:34:53	1.5
@@ -9,8 +9,13 @@
 
 (defpackage #:movitz.ide
   (:use #:cl)
-  (:export #:compile-movitz-file #:compile-defun #:dump-image
-           #:movitz-disassemble #:movitz-disassemble-method))
+  (:export #:compile-movitz-file
+           #:compile-defun
+           #:dump-image
+           #:movitz-disassemble
+           #:movitz-disassemble-method
+           #:movitz-arglist
+           #:movitz-macroexpand))
 
 (in-package #:movitz.ide)
 
@@ -42,6 +47,21 @@
                                         (get-sexpr lambda-list package)
                                         (mapcar #'read-from-string qualifiers)))))
 
+(defun movitz-arglist (name package-name)
+  (let* ((package (get-package package-name))
+         (funobj (movitz::movitz-env-named-function (get-sexpr name package))))
+    (if (not funobj)
+        "not defined"
+        (let ((*package* package))
+          (princ-to-string (movitz::movitz-print (movitz::movitz-funobj-lambda-list funobj)))))))
+
+(defun movitz-macroexpand (string package-name)
+  (let* ((*package* (get-package package-name))
+         (form (get-sexpr string *package*))
+         (expansion (movitz::movitz-macroexpand-1 form)))
+    (princ-to-string (movitz::movitz-print expansion))))
+    
+
 
 ;;;; Utilities.
 




More information about the Movitz-cvs mailing list