diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-11 16:28:52 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2010-11-11 16:28:52 +0100 |
commit | 70cfa5b379e90e6899c7e1a210a5c468dc578479 (patch) | |
tree | 75237d0ac9844d11b61147d77182f78e60b81f76 /scheme/guile/geiser/emacs.scm | |
parent | 8d1e1c47563131cd0f52f0cc02fa0b23eebd2227 (diff) | |
parent | 5a7c0553d5b60cd9475ecb33c5d65b76789757e0 (diff) | |
download | geiser-chez-70cfa5b379e90e6899c7e1a210a5c468dc578479.tar.gz geiser-chez-70cfa5b379e90e6899c7e1a210a5c468dc578479.tar.bz2 |
Merge branch 'guile-meta' into meta-reconnection
Diffstat (limited to 'scheme/guile/geiser/emacs.scm')
-rw-r--r-- | scheme/guile/geiser/emacs.scm | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/scheme/guile/geiser/emacs.scm b/scheme/guile/geiser/emacs.scm index af1a052..54e5d34 100644 --- a/scheme/guile/geiser/emacs.scm +++ b/scheme/guile/geiser/emacs.scm @@ -10,37 +10,38 @@ ;; Start date: Sun Feb 08, 2009 18:39 (define-module (geiser emacs) - #:re-export (ge:macroexpand - ge:compile-file - ge:load-file - ge:autodoc - ge:completions - ge:module-completions - ge:symbol-location - ge:generic-methods - ge:symbol-documentation - ge:module-exports - ge:module-location - ge:callers - ge:callees - ge:find-file) - #:export (ge:compile - ge:no-values - ge:newline) #:use-module (ice-9 match) + #:use-module (system repl command) + #:use-module (system repl error-handling) #:use-module (geiser evaluation) #:use-module ((geiser modules) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser completion) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser xref) :renamer (symbol-prefix-proc 'ge:)) #:use-module ((geiser doc) :renamer (symbol-prefix-proc 'ge:))) -(define (ge:no-values) (values)) -(define ge:newline newline) - -(define (ge:compile form mod) - (match form - (`((@ (geiser emacs) . ,_) . ,_) (compile/no-warns form mod)) - (_ (compile/warns form mod)))) - - -;;; emacs.scm ends here +(define this-module (resolve-module '(geiser emacs))) + +(define-meta-command ((geiser-no-values geiser) repl) + "geiser-no-values +No-op command used internally by Geiser." + (values)) + +(define-meta-command ((geiser-eval geiser) repl (mod form args) . rest) + "geiser-eval +Meta-command used by Geiser to evaluate and compile code." + (if (null? args) + (call-with-error-handling + (lambda () (ge:compile form mod))) + (let ((proc (eval form this-module))) + (ge:eval `(,proc ,@args) mod)))) + +(define-meta-command ((geiser-load-file geiser) repl file) + "geiser-load-file +Meta-command used by Geiser to load and compile files." + (call-with-error-handling + (lambda () (ge:compile-file file)))) + +(define-meta-command ((geiser-newline geiser) repl) + "geiser-newline +Meta-command used by Geiser to emit a new line." + (newline)) |