unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: push and pop
Date: Fri, 07 Jan 2005 20:39:42 +0100	[thread overview]
Message-ID: <x5mzvlgha9.fsf@lola.goethe.zz> (raw)
In-Reply-To: <pan.2005.01.07.18.21.53.124866@as.arizona.edu> (JD Smith's message of "Fri, 07 Jan 2005 11:21:53 -0700")

JD Smith <jdsmith@as.arizona.edu> 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	other threads:[~2005-01-07 19:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-07 18:21 push and pop JD Smith
2005-01-07 19:39 ` David Kastrup [this message]
2005-01-07 20:23 ` Stefan Monnier
2005-01-07 21:15   ` JD Smith
2005-01-08  2:19     ` Miles Bader
2005-01-08 15:34     ` Richard Stallman
2005-01-09 17:53       ` JD Smith
2005-01-09 19:04         ` Francis Litterio
2005-01-09 19:42         ` Luc Teirlinck
2005-01-09 19:56           ` David Kastrup
2005-01-10 20:27             ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=x5mzvlgha9.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).