unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: miles@gnu.org, yamaoka@jpl.org, snogglethorpe@gmail.com,
	emacs-w3m@namazu.org, emacs-devel@gnu.org
Subject: Re: bogus change(s) in cl-macs.el
Date: Fri, 19 Nov 2004 15:04:34 -0500	[thread overview]
Message-ID: <E1CVEzi-0001Bh-Ci@fencepost.gnu.org> (raw)
In-Reply-To: <87d5yajs0c.fsf-monnier+emacs@gnu.org> (message from Stefan Monnier on Fri, 19 Nov 2004 02:10:55 -0500)

    > (macroexpand
    >  '(labels ((FOO nil FOO-BODY)
    > 	   (BAR nil BAR-BODY))
    >     (FOO)
    >     (BAR)))

    > (let ((--cl---cl-var---- nil)
    >       (--cl---cl-var---- nil))
    >   (progn
    >     (progn
    >       (set '--cl---cl-var---- #'(lambda nil BAR-BODY))
    >       (set '--cl---cl-var---- #'(lambda nil FOO-BODY)))
    >     (funcall (symbol-value '--cl---cl-var----))
    >     (funcall (symbol-value '--cl---cl-var----))))

    > One of two functions FOO and BAR is disregarded as you see.

    Well, actually we can't see it here because you haven't used print-gensym
    to distinguish symbols with the same name.

Using print-gensym is the right way to print such code, but there is
some value in producing code that will run correctly (in most cases)
even if it is printed and read without using print-gensym.  Sure, if
you print it that way, there's a danger that a gensym might share the
name of some other symbol in the program, and cause incorrect
shadowing; but that will essentially never happen in practice.  It's
not an improvement when something that nearly always worked now nearly
always fails in an obscure way.

So I think it is better to continue using something that produces
different names, as gensym does.  It could be defined all the time in
Emacs, if that avoids some problems.

  reply	other threads:[~2004-11-19 20:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19  3:06 bogus change(s) in cl-macs.el Katsumi Yamaoka
2004-11-19  3:41 ` Luc Teirlinck
2004-11-19  3:51   ` Miles Bader
2004-11-19  4:21     ` Luc Teirlinck
2004-11-19  3:48 ` Miles Bader
2004-11-19  3:59   ` Katsumi Yamaoka
2004-11-19  5:55     ` [emacs-w3m:07185] " Katsumi Yamaoka
2004-11-19  7:10       ` Stefan Monnier
2004-11-19 20:04         ` Richard Stallman [this message]
2004-11-26  2:17         ` Katsumi Yamaoka
2004-11-26  4:03           ` Stefan Monnier
2004-11-26  5:18             ` Katsumi Yamaoka
2004-11-26 23:51         ` Stefan Monnier
2004-11-19  5:40 ` Stefan Monnier

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=E1CVEzi-0001Bh-Ci@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-w3m@namazu.org \
    --cc=miles@gnu.org \
    --cc=snogglethorpe@gmail.com \
    --cc=yamaoka@jpl.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).