[slime-cvs] CVS slime/contrib
CVS User sboukarev
sboukarev at common-lisp.net
Mon Sep 28 21:28:29 UTC 2009
Update of /project/slime/cvsroot/slime/contrib
In directory cl-net:/tmp/cvs-serv31807/contrib
Modified Files:
ChangeLog slime-repl.el
Log Message:
* slime-repl.el (slime-sync-package-and-default-directory):
Do not try to set package if it doesn't exists.
--- /project/slime/cvsroot/slime/contrib/ChangeLog 2009/09/25 06:43:33 1.248
+++ /project/slime/cvsroot/slime/contrib/ChangeLog 2009/09/28 21:28:29 1.249
@@ -1,3 +1,8 @@
+2009-09-28 Stas Boukarev <stassats at gmail.com>
+
+ * slime-repl.el (slime-sync-package-and-default-directory):
+ Do not try to set package if it doesn't exists.
+
2009-09-25 Tobias C. Rittweiler <tcr at freebits.de>
* swank-sbcl-exts.lisp: Add EVAL-WHEN to prevent subtle dependency
--- /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/09/17 14:56:22 1.25
+++ /project/slime/cvsroot/slime/contrib/slime-repl.el 2009/09/28 21:28:29 1.26
@@ -1449,9 +1449,11 @@
(defun slime-sync-package-and-default-directory ()
"Set Lisp's package and directory to the values in current buffer."
(interactive)
- (let ((package (slime-current-package))
- (directory default-directory))
- (when package
+ (let* ((package (slime-current-package))
+ (exists-p (or (null package)
+ (slime-eval `(swank::guess-package ,package))))
+ (directory default-directory))
+ (when (and package exists-p)
(slime-repl-set-package package))
(slime-set-default-directory directory)
;; Sync *inferior-lisp* dir
@@ -1460,9 +1462,10 @@
(when buffer
(with-current-buffer buffer
(setq default-directory directory))))
- (message "package: %s default-directory: %s"
+ (message "package: %s%s directory: %s"
(with-current-buffer (slime-output-buffer)
(slime-lisp-package))
+ (if exists-p "" (format " (package %s doesn't exist)" package))
directory)))
(defun slime-goto-connection ()
More information about the slime-cvs
mailing list