[slime-cvs] CVS slime

CVS User trittweiler trittweiler at common-lisp.net
Thu May 28 15:42:47 UTC 2009


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

Modified Files:
	swank.lisp ChangeLog 
Log Message:
	* swank.lisp (tokenize-symbol-thoroughly): Make it work correctly
	on escaped symbols.


--- /project/slime/cvsroot/slime/swank.lisp	2009/05/17 19:12:53	1.647
+++ /project/slime/cvsroot/slime/swank.lisp	2009/05/28 15:42:47	1.648
@@ -363,7 +363,7 @@
          (close-connection ,var
                            (swank-error.condition condition)
                            (swank-error.backtrace condition)))))))
-  
+
 (defmacro with-panic-handler ((connection) &body body)
   (let ((var (gensym)))
   `(let ((,var ,connection))
@@ -1996,26 +1996,31 @@
         (backslash nil)
         (vertical nil)
         (internp nil))
-    (loop for char across string
-       do (cond
+    (loop for char across string do
+          (cond
             (backslash
              (vector-push-extend char token)
              (setq backslash nil))
             ((char= char #\\) ; Quotes next character, even within |...|
              (setq backslash t))
             ((char= char #\|)
-             (setq vertical t))
+             (setq vertical (not vertical)))
             (vertical
              (vector-push-extend char token))
             ((char= char #\:)
-             (if package
-                 (setq internp t)
-                 (setq package token
-                       token (make-array (length string)
-                                         :element-type 'character
-                                         :fill-pointer 0))))
+             (cond ((and package internp)
+                    (error "More than two colons in ~S" string))
+                   (package
+                    (setq internp t))
+                   (t
+                    (setq package token
+                          token (make-array (length string)
+                                            :element-type 'character
+                                            :fill-pointer 0)))))
             (t
              (vector-push-extend (casify-char char) token))))
+    (when vertical
+      (error "Unclosed vertical bar in ~S" string))
     (values token package (or (not package) internp))))
 
 (defun untokenize-symbol (package-name internal-p symbol-name)
--- /project/slime/cvsroot/slime/ChangeLog	2009/05/28 15:38:11	1.1773
+++ /project/slime/cvsroot/slime/ChangeLog	2009/05/28 15:42:47	1.1774
@@ -1,5 +1,10 @@
 2009-05-28  Tobias C. Rittweiler  <tcr at freebits.de>
 
+	* swank.lisp (tokenize-symbol-thoroughly): Make it work correctly
+	on escaped symbols.
+
+2009-05-28  Tobias C. Rittweiler  <tcr at freebits.de>
+
 	* slime.el (slime-disconnect): Now only disconnects one
 	connection, current one by default, or given by argument.
 	(slime-disconnect-all): New. What `slime-disconnect' was before.





More information about the slime-cvs mailing list