Adding directory support to swank.scm.
authorPeter Feigl <craven@gmx.net>
Thu, 3 May 2012 07:36:24 +0000 (09:36 +0200)
committerTaylor R Campbell <campbell@mumble.net>
Wed, 11 Jul 2012 03:45:02 +0000 (03:45 +0000)
* Directories
Added directory functions SWANK:DEFAULT-DIRECTORY and
SWANK:SET-DEFAULT-DIRECTORY for slime commands ,!d ,cd ,+d ,-d
,change-directory ,push-directory ,pop-directory ,pushd ,popd ,pwd

src/runtime/swank.scm

index cd59077313f0168e21c92e85a1a1dabd5556323f..fa932d9b45dee197a4584f391995052818490d77 100644 (file)
@@ -370,6 +370,13 @@ USA.
       (compiler:disassemble
        (eval (read-from-string string)
             (buffer-env))))))
+
+;;;; Directory Functions
+(define (swank:default-directory socket)
+  (->namestring (working-directory-pathname)))
+
+(define (swank:set-default-directory socket directory)
+  (->namestring (set-working-directory-pathname! directory)))
 \f
 ;;;; Miscellaneous