help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to exit function from inside its `interactive' call?


From: Thorsten Jolitz
Subject: Re: How to exit function from inside its `interactive' call?
Date: Wed, 06 Aug 2014 23:12:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Drew Adams <drew.adams@oracle.com> writes:

>> how can I use catch/throw (or whatever) to exit function foo from inside
>> its 'interactive call? All combinations I tried so far only exit
>> 'interactive and still execute the function body.
>
> (defun bar ()
>   (interactive (top-level))
>   (message "aaaaaaaaa"))
>
> (defun foo ()
>   (interactive
>    (throw 'top-level 'HELLO))
>   (message "JJJJJJJJJJJJJJ"))


That works, thanks!
Did not know about `top-level'. 

-- 
cheers,
Thorsten




reply via email to

[Prev in Thread] Current Thread [Next in Thread]