[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Tue Mar 20 22:17:37 UTC 2007


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

Modified Files:
	swank.lisp 
Log Message:
(completion-output-symbol-converter): Fix completion for mixed-case
symbols that need escaping in readtable-case :upcase or :downcase.


--- /project/slime/cvsroot/slime/swank.lisp	2007/02/26 09:56:06	1.460
+++ /project/slime/cvsroot/slime/swank.lisp	2007/03/20 22:17:36	1.461
@@ -3350,9 +3350,21 @@
   (let ((case-converter (completion-output-case-converter input))
         (case-converter-with-escaping (completion-output-case-converter input t)))
     (lambda (str)
-      (if (some (lambda (el)
-                  (member el '(#\: #\, #\  #\Newline #\Tab)))
-                str)
+      (if (or (multiple-value-bind (lowercase uppercase)
+                  (determine-case str)
+                ;; In these readtable cases, symbols with letters from
+                ;; the wrong case need escaping
+                (case (readtable-case *readtable*)
+                  (:upcase   lowercase)
+                  (:downcase uppercase)
+                  (t         nil)))
+              (some (lambda (el)
+                      (or (member el '(#\: #\Space #\Newline #\Tab))
+                          (multiple-value-bind (macrofun nonterminating)
+                              (get-macro-character el)
+                            (and macrofun
+                                 (not nonterminating)))))
+                    str))
           (concatenate 'string "|" (funcall case-converter-with-escaping str) "|")
           (funcall case-converter str)))))
 




More information about the slime-cvs mailing list