From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: push and pop Date: Fri, 07 Jan 2005 15:23:38 -0500 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 1105164946 31137 80.91.229.6 (8 Jan 2005 06:15:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Jan 2005 06:15:46 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 08 07:15: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 1Cn9sx-0004zE-00 for ; Sat, 08 Jan 2005 07:15:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnA4L-0002iZ-9C for ged-emacs-devel@m.gmane.org; Sat, 08 Jan 2005 01:27:25 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CnA1c-0001eq-TZ for emacs-devel@gnu.org; Sat, 08 Jan 2005 01:24:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CnA1O-0001Ym-Pv for emacs-devel@gnu.org; Sat, 08 Jan 2005 01:24:27 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CnA1M-0001Ry-OC for emacs-devel@gnu.org; Sat, 08 Jan 2005 01:24:20 -0500 Original-Received: from [199.232.41.8] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1Cn9XT-00030x-5G for emacs-devel@gnu.org; Sat, 08 Jan 2005 00:53:27 -0500 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by mx20.gnu.org with esmtp (Exim 4.34) id 1Cn5E0-0002ni-0B for emacs-devel@gnu.org; Fri, 07 Jan 2005 20:17:04 -0500 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 7862B8282AA; Fri, 7 Jan 2005 15:23:42 -0500 (EST) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 1FFE04AC0DA; Fri, 7 Jan 2005 15:23:39 -0500 (EST) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id D313E8CA69; Fri, 7 Jan 2005 15:23:38 -0500 (EST) 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-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=-4.68, requis 5, autolearn=not spam, AWL 0.22, BAYES_00 -4.90) X-MailScanner-From: monnier@iro.umontreal.ca 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:32028 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32028 > 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. I don't see the problem. When debugging code in a file that does (require FOO), you need to (require FOO) before doing C-x C-e or M-C-x. Nothing new here. The only difference is that in macs-20 (when subr.el didn't define its iown version of `pop') you'd get an error "void function `pop'" whereas now you get another error. > Any suggestions on how to work around this (other than the obvious "don't > do that")? Don't do that, Stefan