Easy, peasy. The only trick here is to use parse() in the case that
compile-file-for-emacs is not being asked to load the `compiled' file.
#+EMAIL: csr21@cantab.net
#+OPTIONS: H:2
* Protocol requests
-** core slimefuns [31/95]
+** core slimefuns [33/95]
- [ ] ping
- [X] create-repl
- [ ] create-listener
- [ ] sldb-step
- [ ] sldb-next
- [ ] sldb-out
- - [ ] compile-file-for-emacs
+ - [X] compile-file-for-emacs
- [X] compile-string-for-emacs
- [ ] compile-multiple-strings-for-emacs
- [ ] compile-file-if-needed
- - [ ] load-file
+ - [X] load-file
- [X] swank-require
- [ ] swank-macroexpand-1
- [ ] swank-macroexpand
setwd(directory)
`swank:default-directory`(slimeConnection, sldbState)
}
+
+`swank:load-file` <- function(slimeConnection, sldbState, filename) {
+ source(filename, local=FALSE)
+ TRUE
+}
+
+`swank:compile-file-for-emacs` <- function(slimeConnection, sldbState, filename, loadp, ...) {
+ if(loadp==quote(`t`)) {
+ source(filename, local=FALSE)
+ } else {
+ parse(filename)
+ }
+ TRUE
+}