mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
* lang/elisp/interface.scm: * lang/elisp/internals/lambda.scm: * lang/elisp/primitives/syntax.scm: * lang/elisp/transform.scm: Use (lang elisp expand) as the transformer, because we really are intending this code for the memoizer and not the compiler. * lang/elisp/expand.scm: A null expander. * lang/elisp/interface.scm (use-elisp-file, use-elisp-library): * lang/elisp/transform.scm (scheme): Turn these defmacros into procedure->memoizing-macro calls, given that without syncase we have no defmacro either. * lang/elisp/primitives/fns.scm (macroexpand): Comment out, as Scheme's macro expander (temporarily on hiatus) won't work with elisp.
46 lines
950 B
Scheme
46 lines
950 B
Scheme
(define-module (lang elisp primitives fns)
|
|
#:use-module (lang elisp internals set)
|
|
#:use-module (lang elisp internals fset)
|
|
#:use-module (lang elisp internals null))
|
|
|
|
(fset 'fset fset)
|
|
(fset 'defalias fset)
|
|
|
|
(fset 'apply elisp-apply)
|
|
|
|
(fset 'funcall
|
|
(lambda (function . args)
|
|
(elisp-apply function args)))
|
|
|
|
(fset 'interactive-p
|
|
(lambda ()
|
|
%nil))
|
|
|
|
(fset 'commandp
|
|
(lambda (sym)
|
|
(if (interactive-specification (fref sym)) #t %nil)))
|
|
|
|
(fset 'fboundp
|
|
(lambda (sym)
|
|
(->nil (variable? (symbol-fref sym)))))
|
|
|
|
(fset 'symbol-function fref/error-if-void)
|
|
|
|
;; FIXME -- lost in the syncase conversion
|
|
;; (fset 'macroexpand macroexpand)
|
|
|
|
(fset 'subrp
|
|
(lambda (obj)
|
|
(->nil (not (not-subr? obj)))))
|
|
|
|
(fset 'byte-code-function-p
|
|
(lambda (object)
|
|
%nil))
|
|
|
|
(fset 'run-hooks
|
|
(lambda hooks
|
|
(for-each (lambda (hooksym)
|
|
(for-each (lambda (fn)
|
|
(elisp-apply fn '()))
|
|
(value hooksym #f)))
|
|
hooks)))
|