Skip to content

Commit

Permalink
Implement swank:describe-symbol (i.e. C-c C-d d) using chicken-doc
Browse files Browse the repository at this point in the history
  • Loading branch information
nickg committed Jan 2, 2011
1 parent b3d5dd6 commit b0243b5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README
Expand Up @@ -7,7 +7,7 @@ for more details.

Quickstart:

1) chicken-install fmt symbol-utils apropos
1) chicken-install fmt symbol-utils apropos chicken-doc

2) Add chicken-slime.el to your Emacs load-path

Expand Down
8 changes: 7 additions & 1 deletion swank-chicken.scm
Expand Up @@ -24,6 +24,7 @@
(require 'posix)
(require-extension symbol-utils
apropos
chicken-doc
fmt)


Expand Down Expand Up @@ -438,7 +439,12 @@
(apropos-information-list prefix)))))
`(:ok (,comps ,(if (= (length comps) 1)
(car comps)
prefix)))))
prefix)))))

(define (swank:describe-symbol sym)
`(:ok ,(with-output-to-string
(lambda ()
(doc-dwim sym)))))

;; Unimplemented.
(define (swank:buffer-first-change . _) '(:ok nil))
Expand Down
3 changes: 2 additions & 1 deletion swank.scm
Expand Up @@ -18,7 +18,8 @@
swank:buffer-first-change
swank:filename-to-modulename
swank:find-definitions-for-emacs
swank:swank-require)
swank:swank-require
swank:describe-symbol)
(import scheme
chicken)
(use ports
Expand Down

0 comments on commit b0243b5

Please sign in to comment.