[slime-cvs] CVS slime

mkoeppe mkoeppe at common-lisp.net
Thu Jul 13 20:09:10 UTC 2006


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

Modified Files:
	swank.lisp 
Log Message:
(keywords-of-operator): New support function for writing user-defined
`extra-keywords' methods.


--- /project/slime/cvsroot/slime/swank.lisp	2006/06/18 18:21:54	1.385
+++ /project/slime/cvsroot/slime/swank.lisp	2006/07/13 20:09:09	1.386
@@ -2083,6 +2083,18 @@
              :highlight highlight))))))
   nil)
 
+(defun keywords-of-operator (operator)
+  "Return a list of KEYWORD-ARGs that OPERATOR accepts.
+This function is useful for writing EXTRA-KEYWORDS methods for
+user-defined functions which are declared &ALLOW-OTHER-KEYS and which
+forward keywords to OPERATOR."
+  (let ((arglist (form-completion operator nil 
+                                  :remove-args nil)))
+    (unless (eql arglist :not-available)
+      (values 
+       (arglist.keyword-args arglist)
+       (arglist.allow-other-keys-p arglist)))))
+
 (defslimefun completions-for-keyword (name keyword-string)
   (with-buffer-syntax ()
     (let* ((form (operator-designator-to-form name))




More information about the slime-cvs mailing list