all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: martin rudalics <rudalics@gmx.at>, emacs-devel@gnu.org
Subject: Re: C-g while exiting the minibuffer
Date: Thu, 28 Nov 2013 20:38:16 -0500	[thread overview]
Message-ID: <jwvbo14f0r3.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m2pppkqfo8.fsf@linux-m68k.org> (Andreas Schwab's message of "Fri, 29 Nov 2013 00:17:59 +0100")

Found it:

    revno: 39564
    committer: Gerd Moellmann <gerd@gnu.org>
    timestamp: Fri 2001-10-05 09:48:47 +0000
    message:
      (LIST_END_P, FOREACH): New macros.


   /* Loop over Lisp list LIST.  Signal an error if LIST is not a proper
      list, or if it contains circles.
      
      HARE and TORTOISE should be the names of Lisp_Object variables, and
      N should be the name of an EMACS_INT variable declared in the
      function where the macro is used.  Each nested loop should use
      its own variables.
   
      In the loop body, HARE is set to each cons of LIST, and N is the
      length of the list processed so far.  */
   
   #define LIST_END_P(list, obj)				\
     (NILP (obj)						\
      ? 1							\
      : (CONSP (obj)					\
         ? 0						\
         : (wrong_type_argument (Qlistp, (list), 0)), 1))
   
   #define FOREACH(hare, list, tortoise, n)		\
     for (tortoise = hare = (list), n = 0;			\
          !LIST_END_P (list, hare);			\
          (hare = XCDR (hare), ++n,			\
   	((n & 1) != 0					\
   	 ? (tortoise = XCDR (tortoise),			\
   	    (EQ (hare, tortoise)			\
   	     && (circular_list_error ((list)), 1)))	\
   	 : 0)))

Died in 2011:

    revno: 103880.1.17
    committer: Paul Eggert <eggert@cs.ucla.edu>
    branch nick: atest
    timestamp: Mon 2011-04-11 22:17:33 -0700
    message:
      * lisp.h (circular_list_error, FOREACH): Remove; unused.


-- Stefan



  parent reply	other threads:[~2013-11-29  1:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27 21:15 C-g while exiting the minibuffer Stefan Monnier
2013-11-28  1:54 ` Stefan Monnier
2013-11-28  3:53   ` Eli Zaretskii
2013-11-28 15:14     ` Stefan Monnier
2013-11-28 17:02 ` martin rudalics
2013-11-28 19:22   ` Stefan Monnier
2013-11-28 23:17     ` Andreas Schwab
2013-11-29  1:34       ` Stefan Monnier
2013-11-29  1:38       ` Stefan Monnier [this message]
2013-11-30 12:16     ` martin rudalics
2013-12-01 22:13       ` Stefan Monnier
2013-12-02  3:30         ` Stephen J. Turnbull
2013-12-05 14:02         ` martin rudalics

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

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

  git send-email \
    --in-reply-to=jwvbo14f0r3.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=rudalics@gmx.at \
    --cc=schwab@linux-m68k.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.