[Top][All Lists]

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

Re: return

From: Tassilo Horn
Subject: Re: return
Date: Fri, 26 Nov 2010 10:19:20 +0100
User-agent: KMail/1.13.5 (Linux/2.6.36; KDE/4.5.3; x86_64; ; )

On Friday 26 November 2010 09:57:21 Lars Magne Ingebrigtsen wrote:
> Wouldn't it be nice if Emacs Lisp had a workable early-return
> mechanism?

I guess so.  One option you didn't list is using catch/throw:

(defun foo (n)
  (catch 'val
    (when zot
      (throw 'val t))))

That's at least not something you need the cl package for.


reply via email to

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