1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-07-03 16:20:39 +02:00

fix elisp `catch'

* module/language/elisp/boot.el (catch): Only catch exceptions of type
  `elisp-exception'.
This commit is contained in:
BT Templeton 2011-07-07 23:29:31 -04:00
parent 97d9da9a87
commit 5fa5bf7d10

View file

@ -95,17 +95,17 @@
(defmacro catch (tag &rest body) (defmacro catch (tag &rest body)
(let* ((temp (make-symbol "catch-temp")) (let* ((temp (make-symbol "catch-temp"))
(elisp-key (make-symbol "catch-elisp-key")) (elisp-key (make-symbol "catch-elisp-key"))
(dummy-key (make-symbol "catch-dummy-key")) (key (make-symbol "catch-key"))
(value (make-symbol "catch-value"))) (value (make-symbol "catch-value")))
`(lexical-let ((,temp ,tag)) `(lexical-let ((,temp ,tag))
(funcall (@ (guile) catch) (funcall (@ (guile) catch)
t 'elisp-exception
#'(lambda () ,@body) #'(lambda () ,@body)
#'(lambda (,dummy-key ,elisp-key ,value) #'(lambda (,key ,elisp-key ,value)
(if (eq ,elisp-key ,temp) (if (eq ,elisp-key ,temp)
,value ,value
(funcall (@ (guile) throw) (funcall (@ (guile) throw)
,dummy-key ,key
,elisp-key ,elisp-key
,value))))))) ,value)))))))