Commit df701650 authored by Christophe Rhodes's avatar Christophe Rhodes
Browse files

add `swank:apropos-list-for-emacs`

and also `swank:describe-definition-for-emacs`, helping to make it
useful.  It's still a bit weird with the confusion between name of
thing, name of help file, and so on (and also because
describe-definition-for-emacs must return a definition kind from a
restricted set defined in base slime) but it's basically working.
parent 04218c0c
......@@ -381,6 +381,25 @@ helpFilesWithTopicString <- function(value) {
`swank:apropos-list-for-emacs` <- function(slimeConnection, sldbState, name, onlyExternal, package, caseSensitive) {
x <-, fields="alias", package=.packages())$matches
brieflyDescribe <- function(name, title) {
if (exists(name, globalenv())) {
val <- get(name, globalenv())
kind <- if("function" %in% class(val)) quote(`:function`) else quote(`:variable`)
list(quote(`:designator`), name, kind, title)
} else {
## maybe
list(quote(`:designator`), name, quote(`:type`), title)
mapply(brieflyDescribe, x[,"name"], x[,"title"], SIMPLIFY=FALSE)
`swank:describe-definition-for-emacs` <- function(slimeConnection, sldbState, name, kind) {
`swank:describe-symbol`(slimeConnection, sldbState, name, NULL)
`swank:throw-to-toplevel` <- function(slimeConnection, sldbState) {
condition <- simpleCondition("Throw to toplevel")
class(condition) <- c("swankTopLevel", class(condition))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment