[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Sat Oct 28 17:43:28 UTC 2006


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

Modified Files:
	slime.el 
Log Message:
(slime-completions-for-character): New.
(slime-contextual-completions): Use it here.


--- /project/slime/cvsroot/slime/slime.el	2006/10/26 13:38:07	1.677
+++ /project/slime/cvsroot/slime/slime.el	2006/10/28 17:43:28	1.678
@@ -6130,7 +6130,8 @@
   "Return a list of completions of the token from BEG to END in the
 current buffer."
   (let ((token (buffer-substring-no-properties beg end)))
-    (when (and (< beg (point-max))
+    (cond
+     ((and (< beg (point-max))
                (string= (buffer-substring-no-properties beg (1+ beg)) ":"))
       ;; Contextual keyword completion
       (multiple-value-bind (operator-names arg-indices)
@@ -6146,8 +6147,13 @@
             ;; If no matching keyword was found, do regular symbol
             ;; completion.
             ))))
+     ((and (> beg 2)
+           (string= (buffer-substring-no-properties (- beg 2) beg) "#\\"))
+      ;; Character name completion
+      (return-from slime-contextual-completions
+        (slime-completions-for-character token))))
     ;; Regular symbol completion
-    (slime-completions (buffer-substring-no-properties beg end))))
+    (slime-completions token)))
 
 (defun slime-completions (prefix)
   (slime-eval `(swank:completions ,prefix ',(slime-current-package))))
@@ -6161,6 +6167,9 @@
                                               ,prefix
                                               ',arg-indices)))
 
+(defun slime-completions-for-character (prefix)
+  (slime-eval `(swank:completions-for-character ,prefix)))
+
 
 ;;;; Fuzzy completion
 




More information about the slime-cvs mailing list