[slime-cvs] CVS update: slime/slime.el

Dan Barlow dbarlow at common-lisp.net
Fri Oct 17 01:38:03 UTC 2003


Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv4946

Modified Files:
	slime.el 
Log Message:
(slime-find-buffer-package): handle errors from (read)
for the case where the buffer ends before the in-package form does
(slime-set-package): insert missing comma
(slime-goto-source-location): sbcl has a disagreement with emacs
over the meaning of a character position.  Level up with
C-M-f C-M-b

Date: Thu Oct 16 21:38:03 2003
Author: dbarlow

Index: slime/slime.el
diff -u slime/slime.el:1.36 slime/slime.el:1.37
--- slime/slime.el:1.36	Thu Oct 16 17:28:20 2003
+++ slime/slime.el	Thu Oct 16 21:38:01 2003
@@ -323,7 +323,7 @@
 				nil t))
       (goto-char (match-end 0))
       (skip-chars-forward " \n\t\f\r#:")
-      (let ((pkg (read (current-buffer))))
+      (let ((pkg (condition-case nil (read (current-buffer)) (error nil ))))
 	(cond ((stringp pkg)
 	       pkg)
 	      ((symbolp pkg)
@@ -2077,7 +2077,7 @@
 (defun slime-set-package (package)
   (interactive (list (slime-read-package-name "Package: " 
 					      (slime-find-buffer-package))))
-  (message "*package*: %s" (slime-eval `(swank:set-package package))))
+  (message "*package*: %s" (slime-eval `(swank:set-package ,package))))
 
 (defun slime-set-default-directory (directory)
   (interactive (list (read-file-name "Directory: " nil default-directory t)))
@@ -2241,7 +2241,8 @@
       (:file
        (funcall (if other-window #'find-file-other-window #'find-file)
 		(plist-get source-location :filename))
-       (goto-char (plist-get source-location :position)))
+       (goto-char (plist-get source-location :position))
+       (forward-sexp) (backward-sexp))
       (:stream
        (let ((info (plist-get source-location :info)))
 	 (cond ((and (consp info) (eq :emacs-buffer (car info)))
@@ -2805,7 +2806,7 @@
 (def-slime-test compile-defun 
     (program subform)
     "Compile PROGRAM containing errors.
-Confirm that SUBFORM is correclty located."
+Confirm that SUBFORM is correctly located."
     '(("(defun :foo () (:bar))" (:bar))
       ("(defun :foo () 
          #\\space





More information about the slime-cvs mailing list