[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Mon Jul 24 14:01:03 UTC 2006


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

Modified Files:
	slime.el 
Log Message:
(slime-enclosing-operator-names): For nesting levels
without operator, record nil.
(slime-completions-for-keyword): New argument arg-indices. 
(slime-contextual-completions): Pass all enclosing operators and 
arg-indices to slime-completions-for-keyword.


--- /project/slime/cvsroot/slime/slime.el	2006/07/16 15:25:33	1.634
+++ /project/slime/cvsroot/slime/slime.el	2006/07/24 14:01:03	1.635
@@ -5925,13 +5925,14 @@
     (when (and (< beg (point-max))
                (string= (buffer-substring-no-properties beg (1+ beg)) ":"))
       ;; Contextual keyword completion
-      (let ((operator-names (save-excursion 
-                              (goto-char beg)
-                              (nth-value 0
-                                         (slime-enclosing-operator-names 1)))))
+      (multiple-value-bind (operator-names arg-indices)
+          (save-excursion 
+            (goto-char beg)
+            (slime-enclosing-operator-names))
         (when operator-names
           (let ((completions 
-                 (slime-completions-for-keyword (first operator-names) token)))
+                 (slime-completions-for-keyword operator-names token
+                                                arg-indices)))
             (when (first completions)
               (return-from slime-contextual-completions completions))
             ;; If no matching keyword was found, do regular symbol
@@ -5946,9 +5947,11 @@
 (defun slime-simple-completions (prefix)
   (slime-eval `(swank:simple-completions ,prefix ',(slime-current-package))))
 
-(defun slime-completions-for-keyword (operator-designator prefix)
+(defun slime-completions-for-keyword (operator-designator prefix
+                                                          arg-indices)
   (slime-eval `(swank:completions-for-keyword ',operator-designator
-                                              ,prefix)))
+                                              ,prefix
+                                              ',arg-indices)))
 
 
 ;;;; Fuzzy completion
@@ -10182,9 +10185,14 @@
               (when (member (char-syntax (char-after)) '(?\( ?')) 
                 (incf level)
                 (forward-char 1)
-                (when-let (name (slime-symbol-name-at-point))
-                  (push (slime-parse-extended-operator-name name) result)
-                  (push arg-index arg-indices))
+                (let ((name (slime-symbol-name-at-point)))
+                  (cond
+                   (name
+                    (push (slime-parse-extended-operator-name name) result)
+                    (push arg-index arg-indices))
+                   (t
+                    (push nil result)
+                    (push arg-index arg-indices))))
                 (backward-up-list 1)))))))
     (values 
      (nreverse result)




More information about the slime-cvs mailing list