Catch thrown exit in micro-state

This commit is contained in:
syl20bnr 2015-02-22 23:30:00 -05:00
parent 044e0dcad1
commit 0d09c92466
1 changed files with 7 additions and 3 deletions

View File

@ -129,9 +129,13 @@ Available PROPS:
"Auto-generated function"
(interactive)
,@binding-pre
(when ',wrapped
(call-interactively ',wrapped))
,@binding-post
(let ((throwp t))
(catch 'exit
(when ',wrapped
(call-interactively ',wrapped))
(setq throwp nil))
,@binding-post
(when throwp (throw 'exit nil)))
,@doc-body
))))
(append (list (car binding) wrapper-func) binding)))