[Top][All Lists]

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

Re: push and pop

From: Stefan Monnier
Subject: Re: push and pop
Date: Fri, 07 Jan 2005 15:23:38 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> 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,


reply via email to

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