[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Mon Oct 19 22:46:24 UTC 2009


Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv25185/contrib

Modified Files:
	slime-asdf.el swank-asdf.lisp 
Log Message:
* contrib/slime-asdf.el (slime-open-system): New command for opening all files
in a system.
* contrib/swank-asdf.lisp (asdf-system-files): New function for listing all
files in a system.


--- /project/slime/cvsroot/slime/contrib/slime-asdf.el	2009/03/04 17:59:19	1.8
+++ /project/slime/cvsroot/slime/contrib/slime-asdf.el	2009/10/19 22:46:24	1.9
@@ -68,6 +68,15 @@
    `(swank:operate-on-system-for-emacs ,system ,operation , at keyword-args)
    #'slime-compilation-finished))
 
+(defun slime-open-system (name &optional load)
+  (interactive (list (slime-read-system-name)
+                     (y-or-n-p "Load it? ")))
+  (when load
+    (slime-load-system name))
+  (slime-repl-shortcut-eval-async
+   `(swank:asdf-system-files ,name)
+   (lambda (files) (mapc 'find-file files))))
+
 (defslime-repl-shortcut slime-repl-load/force-system ("force-load-system")
   (:handler (lambda ()
               (interactive)
--- /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2008/10/23 21:28:03	1.7
+++ /project/slime/cvsroot/slime/contrib/swank-asdf.lisp	2009/10/19 22:46:24	1.8
@@ -64,4 +64,17 @@
           (list-all-systems-in-central-registry)
           :test #'string=))
 
+(defun asdf-module-files (module)
+  (mapcan #'(lambda (component)
+              (typecase component
+                (asdf:cl-source-file
+                 (list (asdf:component-pathname component)))
+                (asdf:module
+                 (asdf-module-files component))))
+          (asdf:module-components module)))
+
+(defslimefun asdf-system-files (system)
+  (mapcar #'namestring
+          (asdf-module-files (asdf:find-system system))))
+
 (provide :swank-asdf)





More information about the slime-cvs mailing list