Permalink
Browse files

try to parse the Args: line in most ecl functions to make modelines m…

…ore interesting
  • Loading branch information...
1 parent 961cbe4 commit d31550c791bc9fe0b20e05dc5326c9faa382ef22 Geo Carncross committed Dec 22, 2007
Showing with 13 additions and 0 deletions.
  1. +13 −0 swank-ecl.lisp
View
@@ -157,6 +157,19 @@
(typecase name
(generic-function
(clos::generic-function-lambda-list name))
+ (compiled-function
+ ; most of the compiled functions have an Args: line in their docs
+ (with-input-from-string (s (or
+ (si::get-documentation
+ (si:compiled-function-name name) 'function)
+ ""))
+ (do ((line (read-line s nil) (read-line s nil)))
+ ((not line) :not-available)
+ (ignore-errors
+ (if (string= (subseq line 0 6) "Args: ")
+ (return-from nil
+ (read-from-string (subseq line 6))))))))
+ ;
(function
(let ((fle (function-lambda-expression name)))
(case (car fle)

0 comments on commit d31550c

Please sign in to comment.