2 |
#:use-module (lang elisp internals evaluation) |
#:use-module (lang elisp internals evaluation) |
3 |
#:use-module (lang elisp internals fset) |
#:use-module (lang elisp internals fset) |
4 |
#:use-module ((lang elisp internals load) #:select ((load . elisp:load))) |
#:use-module ((lang elisp internals load) #:select ((load . elisp:load))) |
5 |
|
#:use-module ((lang elisp transform) #:select (transformer)) |
6 |
#:export (eval-elisp |
#:export (eval-elisp |
7 |
|
translate-elisp |
8 |
elisp-function |
elisp-function |
9 |
elisp-variable |
elisp-variable |
10 |
load-elisp-file |
load-elisp-file |
21 |
"Evaluate the Elisp expression @var{x}." |
"Evaluate the Elisp expression @var{x}." |
22 |
(eval x the-elisp-module)) |
(eval x the-elisp-module)) |
23 |
|
|
24 |
|
(define (translate-elisp x) |
25 |
|
"Translate the Elisp expression @var{x} to equivalent Scheme code." |
26 |
|
(transformer x)) |
27 |
|
|
28 |
(define (elisp-function sym) |
(define (elisp-function sym) |
29 |
"Return the procedure or macro that implements @var{sym} in Elisp. |
"Return the procedure or macro that implements @var{sym} in Elisp. |
30 |
If @var{sym} has no Elisp function definition, return @code{#f}." |
If @var{sym} has no Elisp function definition, return @code{#f}." |
118 |
(error "No macro name specified or deducible:" obj))) |
(error "No macro name specified or deducible:" obj))) |
119 |
((symbol? obj) |
((symbol? obj) |
120 |
(or name |
(or name |
121 |
(set! name symbol)) |
(set! name obj)) |
122 |
(module-add! the-elisp-module name |
(module-add! the-elisp-module name |
123 |
(module-ref (current-module) obj))) |
(module-ref (current-module) obj))) |
124 |
(else |
(else |