mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 14:21:10 +02:00
implement `throw' in elisp
* module/language/elisp/runtime/subrs.scm (throw): Rewrite in Elisp and move to... * module/language/elisp/boot.el (throw): ...here.
This commit is contained in:
parent
221dc803b0
commit
97d9da9a87
2 changed files with 3 additions and 7 deletions
|
@ -122,10 +122,12 @@
|
||||||
(fset 'fmakunbound (@ (language elisp runtime subrs) fmakunbound))
|
(fset 'fmakunbound (@ (language elisp runtime subrs) fmakunbound))
|
||||||
(fset 'boundp (@ (language elisp runtime subrs) boundp))
|
(fset 'boundp (@ (language elisp runtime subrs) boundp))
|
||||||
(fset 'fboundp (@ (language elisp runtime subrs) fboundp))
|
(fset 'fboundp (@ (language elisp runtime subrs) fboundp))
|
||||||
(fset 'throw (@ (language elisp runtime subrs) throw))
|
|
||||||
(fset 'eval (@ (language elisp runtime subrs) eval))
|
(fset 'eval (@ (language elisp runtime subrs) eval))
|
||||||
(fset' load (@ (language elisp runtime subrs) load))
|
(fset' load (@ (language elisp runtime subrs) load))
|
||||||
|
|
||||||
|
(defun throw (tag value)
|
||||||
|
(funcall (@ (guile) throw) 'elisp-exception tag value))
|
||||||
|
|
||||||
;;; Equality predicates
|
;;; Equality predicates
|
||||||
|
|
||||||
(fset 'eq (@ (guile) eq?))
|
(fset 'eq (@ (guile) eq?))
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
boundp
|
boundp
|
||||||
fboundp
|
fboundp
|
||||||
apply
|
apply
|
||||||
throw
|
|
||||||
eval
|
eval
|
||||||
load))
|
load))
|
||||||
|
|
||||||
|
@ -106,11 +105,6 @@
|
||||||
(else func))))
|
(else func))))
|
||||||
(prim apply (@ (guile) apply) real-func args)))
|
(prim apply (@ (guile) apply) real-func args)))
|
||||||
|
|
||||||
;;; Throw can be implemented as built-in function.
|
|
||||||
|
|
||||||
(define (throw tag value)
|
|
||||||
(prim throw 'elisp-exception tag value))
|
|
||||||
|
|
||||||
;;; Miscellaneous.
|
;;; Miscellaneous.
|
||||||
|
|
||||||
(define (eval form)
|
(define (eval form)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue