mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-07-03 08:10:31 +02:00
fix elisp `catch'
* module/language/elisp/boot.el (catch): Only catch exceptions of type `elisp-exception'.
This commit is contained in:
parent
97d9da9a87
commit
5fa5bf7d10
1 changed files with 4 additions and 4 deletions
|
@ -95,17 +95,17 @@
|
|||
(defmacro catch (tag &rest body)
|
||||
(let* ((temp (make-symbol "catch-temp"))
|
||||
(elisp-key (make-symbol "catch-elisp-key"))
|
||||
(dummy-key (make-symbol "catch-dummy-key"))
|
||||
(key (make-symbol "catch-key"))
|
||||
(value (make-symbol "catch-value")))
|
||||
`(lexical-let ((,temp ,tag))
|
||||
(funcall (@ (guile) catch)
|
||||
t
|
||||
'elisp-exception
|
||||
#'(lambda () ,@body)
|
||||
#'(lambda (,dummy-key ,elisp-key ,value)
|
||||
#'(lambda (,key ,elisp-key ,value)
|
||||
(if (eq ,elisp-key ,temp)
|
||||
,value
|
||||
(funcall (@ (guile) throw)
|
||||
,dummy-key
|
||||
,key
|
||||
,elisp-key
|
||||
,value)))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue