[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: push and pop

From: David Kastrup
Subject: Re: push and pop
Date: Fri, 07 Jan 2005 20:39:42 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

JD Smith <address@hidden> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]