[slime-cvs] CVS slime/contrib

CVS User sboukarev sboukarev at common-lisp.net
Fri Sep 4 13:00:42 UTC 2009


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

Modified Files:
	ChangeLog slime-repl.el 
Log Message:
* slime-repl.el (slime-sync-package-and-default-directory):
Don't change package if it's unknown. Use existing functions for
changing package and directory.


--- /project/slime/cvsroot/slime/contrib/ChangeLog	2009/09/02 17:21:16	1.241
+++ /project/slime/cvsroot/slime/contrib/ChangeLog	2009/09/04 13:00:42	1.242
@@ -1,3 +1,9 @@
+2009-09-04  Stas Boukarev  <stassats at gmail.com>
+
+	* slime-repl.el (slime-sync-package-and-default-directory):
+	Don't change package if it's unknown. Use existing functions for
+	changing package and directory.
+
 2009-09-02  Stas Boukarev  <stassats at gmail.com>
 
 	* swank-arglists.lisp (decode-required-arg): Move LispWorks specific
--- /project/slime/cvsroot/slime/contrib/slime-repl.el	2009/07/02 17:00:25	1.23
+++ /project/slime/cvsroot/slime/contrib/slime-repl.el	2009/09/04 13:00:42	1.24
@@ -1448,23 +1448,21 @@
 (defun slime-sync-package-and-default-directory ()
   "Set Lisp's package and directory to the values in current buffer."
   (interactive)
-  (let ((package (slime-repl-shortcut-eval `(swank:set-package 
-                                             ,(slime-find-buffer-package))))
-	(directory (slime-from-lisp-filename
-                    (slime-repl-shortcut-eval `(swank:set-default-directory 
-                                                ,(slime-to-lisp-filename
-                                                  default-directory))))))
-    (let ((dir default-directory))
-      ;; Sync REPL dir
-      (with-current-buffer (slime-output-buffer)
-        (setq default-directory dir))
-      ;; Sync *inferior-lisp* dir
-      (let* ((proc (slime-process))
-             (buffer (and proc (process-buffer proc))))
-        (when buffer 
-          (with-current-buffer buffer
-            (setq default-directory dir)))))
-    (message "package: %s  default-directory: %s" (car package) directory)))
+  (let ((package (slime-current-package))
+        (directory default-directory))
+    (when package
+      (slime-repl-set-package package))
+    (slime-set-default-directory directory)
+    ;; Sync *inferior-lisp* dir
+    (let* ((proc (slime-process))
+           (buffer (and proc (process-buffer proc))))
+      (when buffer
+        (with-current-buffer buffer
+          (setq default-directory directory))))
+    (message "package: %s  default-directory: %s"
+             (with-current-buffer (slime-output-buffer)
+               (slime-lisp-package))
+             directory)))
 
 (defun slime-goto-connection ()
   "Switch to the REPL buffer for the connection at point."





More information about the slime-cvs mailing list