From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: push and pop Date: Fri, 07 Jan 2005 20:39:42 +0100 Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1105125888 26461 80.91.229.6 (7 Jan 2005 19:24:48 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2005 19:24:48 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jan 07 20:24:39 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cmze1-0002Uk-00 for ; Fri, 07 Jan 2005 20:19:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CmzpO-0000Nf-EU for ged-emacs-devel@m.gmane.org; Fri, 07 Jan 2005 14:31:18 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CmzpC-0000Ly-NZ for emacs-devel@gnu.org; Fri, 07 Jan 2005 14:31:06 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CmzpB-0000L6-Nt for emacs-devel@gnu.org; Fri, 07 Jan 2005 14:31:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CmzpB-0000Kw-Ir for emacs-devel@gnu.org; Fri, 07 Jan 2005 14:31:05 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CmzcZ-0000k7-Ps for emacs-devel@gnu.org; Fri, 07 Jan 2005 14:18:03 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CmzVv-0007gW-Gn; Fri, 07 Jan 2005 14:11:11 -0500 Original-To: JD Smith In-Reply-To: (JD Smith's message of "Fri, 07 Jan 2005 11:21:53 -0700") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32013 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32013 JD Smith writes: > The macros "push" and "pop" in `subr' don't do the same thing as the push > and pop in `cl'. This means that if you use: > > (eval-when-compile (require 'cl)) > > in your code, the behavior will change depending on whether the compiled > version is loaded (cl version), or you are interactively debugging (subr > version). An example of a semantic which will fail with the subr version > but not the cl version: > > (setq ov (pop (cdr ov-list))) > > which requires a list argument to pop, instead of the cdr of a list. > > Any suggestions on how to work around this (other than the obvious > "don't do that")? Well, don't do that. If you require the cl-behavior, then of course you'll also require it for debugging. It's the same with any macro providing package, not just with cl. Anyway, this is not an issue if you do (load "filename") after some change: in that case cl.el will get loaded. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum