[slime-cvs] CVS update: slime/slime.el
Helmut Eller
heller at common-lisp.net
Wed Jan 19 18:31:37 UTC 2005
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv7546
Modified Files:
slime.el
Log Message:
(slime-insert-arglist): Inserts a template for a function call instead
of the plain arglist; this makes a difference for functions with
optional and keyword arguments.
Date: Wed Jan 19 10:31:35 2005
Author: heller
Index: slime/slime.el
diff -u slime/slime.el:1.451 slime/slime.el:1.452
--- slime/slime.el:1.451 Wed Jan 19 03:58:39 2005
+++ slime/slime.el Wed Jan 19 10:31:34 2005
@@ -4239,7 +4239,16 @@
"Insert the argument list for NAME behind the symbol point is
currently looking at."
(interactive (list (slime-read-symbol-name "Arglist of: ")))
- (insert (slime-eval `(swank:arglist-for-insertion ',name))))
+ (let ((arglist (slime-eval `(swank:arglist-for-insertion ',name))))
+ (cond ((eq arglist :not-available)
+ (error "Arglist not available"))
+ ((string-match "^(" arglist)
+ (insert " ")
+ (save-excursion
+ (insert (substring arglist 1))))
+ (t
+ (save-excursion
+ (insert arglist))))))
(defun slime-get-arglist (symbol-name)
"Return the argument list for SYMBOL-NAME."
More information about the slime-cvs
mailing list