[slime-cvs] CVS slime

heller heller at common-lisp.net
Sat Nov 24 08:04:27 UTC 2007


Update of /project/slime/cvsroot/slime
In directory clnet:/tmp/cvs-serv18829

Modified Files:
	swank.lisp slime.el ChangeLog 
Log Message:
* swank.lisp (parse-package): The old version didn't pass the
test-suite.  Now use the reader directly instead of emulating it
half-heartedly.

* slime.el (slime-search-buffer-package): Don't remove double
quotes or "#:", swank:parse-package takes care of that.


--- /project/slime/cvsroot/slime/swank.lisp	2007/11/24 07:58:43	1.516
+++ /project/slime/cvsroot/slime/swank.lisp	2007/11/24 08:04:27	1.517
@@ -1628,20 +1628,10 @@
 (defun parse-package (string)
   "Find the package named STRING.
 Return the package or nil."
-  (check-type string (or string null))
-  (if (zerop (length string))
-      nil
-      (multiple-value-bind (name pos interned?) 
-          (let ((*package* *swank-io-package*))
-            (ignore-errors (read-softly-from-string string)))
-        (unwind-protect
-             (and name
-                  (or (symbolp name) 
-                      (stringp name))
-                  (= (length string) pos)
-                  (find-package name))
-          (when interned?
-            (unintern-in-home-package name))))))
+  ;; STRING comes usually from a (in-package STRING) form.
+  (ignore-errors
+    (find-package (let ((*package* *swank-io-package*))
+                    (read-from-string string)))))
 
 (defun unparse-name (string)
   "Print the name STRING according to the current printer settings."
--- /project/slime/cvsroot/slime/slime.el	2007/11/19 20:18:08	1.878
+++ /project/slime/cvsroot/slime/slime.el	2007/11/24 08:04:27	1.879
@@ -488,7 +488,7 @@
 
 (defun slime-pretty-package-name (name)
   "Return a pretty version of a package name NAME."
-  (let ((name (cond ((string-match "^:\\(.*\\)$" name)    
+  (let ((name (cond ((string-match "^#?:\\(.*\\)$" name)    
                      (match-string 1 name))
                     ((string-match "^\"\\(.*\\)\"$" name) 
                      (match-string 1 name))
@@ -2244,15 +2244,12 @@
 ;;  (in-package #+ansi-cl :cl #-ansi-cl 'lisp)
 (defun slime-search-buffer-package ()
   (let ((case-fold-search t)
-        (regexp (concat "^(\\(cl:\\|common-lisp:\\)?in-package\\>[ \n\t\r']*"
-                        "\\([^)]+\\)[ \n\t]*)")))
+        (regexp (concat "^(\\(cl:\\|common-lisp:\\)?in-package\\>[ \t']*"
+                        "\\([^)]+\\)[ \t]*)")))
     (save-excursion
       (when (or (re-search-backward regexp nil t)
                 (re-search-forward regexp nil t))
-        (let ((string (match-string-no-properties 2)))
-          (cond ((string-match "^\"" string) (ignore-errors (read string)))
-                ((string-match "^#?:" string) (substring string (match-end 0)))
-                (t string)))))))
+        (match-string-no-properties 2)))))
 
 ;;; Synchronous requests are implemented in terms of asynchronous
 ;;; ones. We make an asynchronous request with a continuation function
--- /project/slime/cvsroot/slime/ChangeLog	2007/11/24 07:58:43	1.1246
+++ /project/slime/cvsroot/slime/ChangeLog	2007/11/24 08:04:27	1.1247
@@ -1,5 +1,14 @@
 2007-11-24  Helmut Eller  <heller at common-lisp.net>
 
+	* swank.lisp (parse-package): The old version didn't pass the
+	test-suite.  Now use the reader directly instead of emulating it
+	half-heartedly.
+
+	* slime.el (slime-search-buffer-package): Don't remove double
+	quotes or "#:", swank:parse-package takes care of that.
+
+2007-11-24  Helmut Eller  <heller at common-lisp.net>
+
 	* swank.lisp (apropos-symbols):  Use simple search instead of
 	regexps.
 	(make-apropos-matcher): Used to be make-regexp-matcher.




More information about the slime-cvs mailing list