From xemacs-m  Sat May  3 14:54:33 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id OAA10763
	for <xemacs-beta@xemacs.org>; Sat, 3 May 1997 14:54:31 -0500 (CDT)
Received: by crystal.WonderWorks.COM 
	id QQcnzb28042; Sat, 3 May 1997 15:54:32 -0400 (EDT)
Date: Sat, 3 May 1997 15:54:32 -0400 (EDT)
Message-Id: <QQcnzb28042.199705031954@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: `mapcar' calling SUBRs directly
In-Reply-To: <kig207omjh5.fsf@jagor.srce.hr>
References: <kigenbomwik.fsf@jagor.srce.hr>
	<QQcnyy27061.199705031911@crystal.WonderWorks.COM>
	<kig207omjh5.fsf@jagor.srce.hr>
X-Mailer: VM 6.31 under 19.15p3 XEmacs Lucid
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
        0@~@,s;b,aMtR5Sqs"+nU.z^CSFQ9t`z2>W,S,]:[+2^
        Nbf6v4g>!&,7R4Ot4Wg{&tm=WX7P["9%a)_da48-^tGy
        ,qz]Z,Zz\{E.,]'EO+F)@$KtF&V

Hrvoje Niksic writes:
 > Kyle Jones <kyle_jones@wonderworks.com> writes:
 > 
 > > Hrvoje Niksic writes:
 > >  > Here is the patch that avoids using `call1' when `mapcar' is called
 > >  > with a SUBR (or a symbol whose function is a SUBR) taking exactly one
 > >  > argument. [...]
 > > 
 > > By avoiding the normal Lisp eval path, we lose backtrace
 > > information and the mapcar loop becomes unquittable.
 > 
 > I don't know about backtrace information, but the mapcar loop is
 > certainly not made unquittable.  Take this test:
 > 
 > (setq a '(1))
 > (setcdr a a)           ; a is a circular list

You can't use a circular list as a test.  Fcapcar calls Flength,
which loops endlessly in the list.  Flength runs QUIT and that is
where C-g lets you escape.  Once mapcar starts doing the function
calls, you're trapped until it finishes unless the subr itself
runs QUIT.

 > Besides, I wasn't aware that quitting a loop depended on
 > functions being called using `Ffuncall' -- isn't QUIT
 > supposed to be handled by independent IO routines?

Typing C-g usually just sets a flag.  QUIT (a hairy macro) must
be run to check the flag and let you escape.

