unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: MON KEY <monkey@sandpframing.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: 6497@debbugs.gnu.org
Subject: bug#6497: 6497
Date: Sat, 3 Jul 2010 15:33:58 -0400	[thread overview]
Message-ID: <AANLkTin3n58LxJXY8gFwno194QNhe3xaEDXZIpMGpNS-@mail.gmail.com> (raw)
In-Reply-To: <m2pqz5jbic.fsf@whitebox.home>

On Sat, Jul 3, 2010 at 3:00 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> MON KEY <monkey@sandpframing.com> writes:
>
>> Except it doesn't, as indicated by following pathology:
>>
>>  (setq foo (unintern (makunbound 'foo)))
>>  (indirect-variable foo)
>>
>> `foo' should evaluate to t per return value of `unintern'.
>
> The foos in the two lines are completely unrelated.
>

Yep.

The "first" foo is made unbound.
The "first" foo is uninterned which returns `t'.
The "second" foo is bound to the return value of uninterning the
"first" foo e.g. `t'.

That was not the point of the illustration.

This was:

The evaluation of the indirect-variable for the "second" foo should return `t'.

In the following, we change the "first" foo to a `tbar' there is no
"second" foo and we `set'  tbar instead of `setq'ing foo and this form
does return `t':

(unwind-protect
    (progn (unintern 'foo) (unintern 'tbar))
  (let ((tbar (make-symbol "foo") ))
    (set 'tbar (unintern (makunbound 'foo)))
    (indirect-variable tbar)))
; => t

> Andreas.

--
/s_P\





  reply	other threads:[~2010-07-03 19:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 23:42 bug#6497: documentation `indirect-function', `symbol-function' do not enumerate return value type MON KEY
2010-07-01  9:20 ` bug#6497: 6497 Geoff Gole
2010-07-02  0:13   ` MON KEY
2010-07-02  1:39     ` Geoff Gole
2010-07-03  4:27       ` MON KEY
2010-07-03  6:31         ` Geoff Gole
2010-07-03 19:35           ` MON KEY
2010-07-03  7:00         ` Andreas Schwab
2010-07-03 19:33           ` MON KEY [this message]
2010-07-03 19:47             ` Andreas Schwab
2011-07-09 18:25               ` bug#6497: documentation `indirect-function', `symbol-function' do not enumerate return value type Glenn Morris

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=AANLkTin3n58LxJXY8gFwno194QNhe3xaEDXZIpMGpNS-@mail.gmail.com \
    --to=monkey@sandpframing.com \
    --cc=6497@debbugs.gnu.org \
    --cc=schwab@linux-m68k.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).