[slime-devel] keyword symbol completion

Earl J.Wagner earljwagner at alum.mit.edu
Tue Aug 1 20:03:57 UTC 2006


Ugh. Here's the fixed patch that works for symbols without specified  
packages as well.



Index: swank.lisp
===================================================================
RCS file: /project/slime/cvsroot/slime/swank.lisp,v
retrieving revision 1.387
diff -u -r1.387 swank.lisp
--- swank.lisp	24 Jul 2006 14:01:15 -0000	1.387
+++ swank.lisp	1 Aug 2006 19:32:03 -0000
@@ -1270,7 +1270,9 @@
;; FIXME: deal with #\| etc.  hard to do portably.
(defun tokenize-symbol (string)
    (let ((package (let ((pos (position #\: string)))
-                   (if pos (subseq string 0 pos) nil)))
+                   (cond
+                     ((and pos (= pos 0)) "keyword")
+                     (pos (subseq string 0 pos)))))
          (symbol (let ((pos (position #\: string :from-end t)))
                    (if pos (subseq string (1+ pos)) string)))
          (internp (search "::" string)))
@@ -3089,6 +3091,7 @@
(defun format-completion-result (string internal-p package-name)
    (let ((prefix (cond (internal-p (format nil "~A::" package-name))
+                      ((equal package-name "keyword") ":")
                        (package-name (format nil "~A:" package-name))
                        (t ""))))
      (values (concatenate 'string prefix string)



More information about the slime-devel mailing list