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: Nicolas Richard
Subject: Re: How to exit function from inside its `interactive' call?
Date: Thu, 07 Aug 2014 09:14:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux)

Thorsten Jolitz <tjolitz@gmail.com> writes:
> That works, thanks!
> Did not know about `top-level'. 

There is an obvious shortcoming : if you're in the middle of a recursive
edit, you'll be back to top level.

Why not simply throw an error ?

(defun foo ()
  (interactive
   (user-error "Interrupted"))
  (message "JJJJJJJJJJJJJJ")) 

-- 
Nico.



reply via email to

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