[patch] Fix for Arg detection inside an "Apply" for functions where the lisp can't discover args
Matthew Lamari
matt.lamari at gmail.com
Sun Aug 11 21:59:58 UTC 2013
When in the IDE you type:
(apply #'foo ... ... ...)
When it autodocs the apply, swank attempts to show the "apply" with
foo's params. Pretty impressive; but it didn't have a case for where
#'foo's args can't be queried from the underlying lisp. Discovered this
in lispworks, which can't give back the args for functions compiled
under tightest settings.
The underlying abstraction can return :NOT-AVAILABLE - most of the other
cases look for this, the patch below filters out this case so as to not
give it special handling. . .
--- original/contrib/swank-arglists.lisp Sun Aug 11 16:49:36 2013
+++ replacement/contrib/swank-arglists.lisp Sat Aug 10 23:27:27 2013
@@ -916,26 +916,27 @@
(let ((function-arglist
(compute-enriched-decoded-arglist function-name
(cdr argument-forms))))
- (return-from compute-enriched-decoded-arglist
- (values
- (make-arglist :required-args
- (list 'function)
- :optional-args
- (append
- (mapcar #'(lambda (arg)
- (make-optional-arg arg nil))
- (arglist.required-args
function-arglist))
- (arglist.optional-args function-arglist))
- :key-p
- (arglist.key-p function-arglist)
- :keyword-args
- (arglist.keyword-args function-arglist)
- :rest
- 'args
- :allow-other-keys-p
- (arglist.allow-other-keys-p function-arglist))
- (list function-name-form)
- t)))))))
+ (unless (eq function-arglist :NOT-AVAILABLE)
+ (return-from compute-enriched-decoded-arglist
+ (values
+ (make-arglist :required-args
+ (list 'function)
+ :optional-args
+ (append
+ (mapcar #'(lambda (arg)
+ (make-optional-arg arg nil))
+ (arglist.required-args
function-arglist))
+ (arglist.optional-args function-arglist))
+ :key-p
+ (arglist.key-p function-arglist)
+ :keyword-args
+ (arglist.keyword-args function-arglist)
+ :rest
+ 'args
+ :allow-other-keys-p
+ (arglist.allow-other-keys-p
function-arglist))
+ (list function-name-form)
+ t))))))))
(call-next-method))
(defmethod compute-enriched-decoded-arglist
More information about the slime-devel
mailing list