unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Davis Herring <herring@lanl.gov>
To: Nic Ferrier <nferrier@ferrier.me.uk>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: non-local exits with signal and condition-case
Date: Mon, 03 Jun 2013 09:54:24 -0600	[thread overview]
Message-ID: <51ACBC30.70209@lanl.gov> (raw)
In-Reply-To: <87ehckjiyr.fsf@ferrier.me.uk>

> In this example, I could be in trouble is make-page ever returns
> anything. So I could throw a cons with a type indicator (say, :redirect)
> and check for the type in the when. But that is a lot more work.

In this case, why not just have make-page return nil if it sent the page
and the redirect target otherwise?  If it had some other return value
that you wanted to ignore in this case, on the other hand, you can just
put "nil" as an additional form in the catch.  (Granted: these functions
are unusual in that they are side-effect-only.)

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.



      parent reply	other threads:[~2013-06-03 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-02 16:24 non-local exits with signal and condition-case Nic Ferrier
2013-06-02 18:52 ` Stefan Monnier
2013-06-02 21:33   ` Nic Ferrier
2013-06-03  0:02     ` Stefan Monnier
2013-06-03 15:54     ` Davis Herring [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51ACBC30.70209@lanl.gov \
    --to=herring@lanl.gov \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=nferrier@ferrier.me.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).