From: dkcombs@panix.com (David Combs)
To: help-gnu-emacs@gnu.org
Subject: Re: eval trouble
Date: Sun, 14 Sep 2008 20:57:39 +0000 (UTC) [thread overview]
Message-ID: <gajts3$9i7$1@reader1.panix.com> (raw)
In-Reply-To: mailman.17522.1219697977.18990.help-gnu-emacs@gnu.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1467 bytes --]
In article <mailman.17522.1219697977.18990.help-gnu-emacs@gnu.org>,
Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:
>David Kastrup wrote:
>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>
>>> Pascal J. Bourguignon wrote:
>>>> "Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
>>>>>> Here is the code that does NOT work:
>>>>>>
>>>>>> (defun mumamo-define-no-mode (mode-sym)
>>>>>> (let ((mumamo-repl4 (make-symbol (format "mumamo-repl4-%s" mode-sym)))
>>>>> It works if I replace make-symbol with intern. But why does eval care
>>>>> about that?
>>>> eval doesn't care, but how would you be able to refer again to the
>>>> defined thing if you don't have its name in some dictionary?
>>>
>>> Thanks. I see. I thought eval interned the symbol, or perhaps rather
>>> created an interned symbol. In this case it does not do that.
>>
>> Eval _does_ create an interned symbol. But it is not EQ to the unique
>> uninterned symbol that make-symbol creates.
>>
>
>I am a bit confused, but I guess you mean if the symbol does not exist:
>
>(let ((sym (make-symbol "xýzw")))
> (eval `(progn (setq ,sym 1)
> (put ',sym 'some 'value))))
>
>(mapatoms (lambda (atom)
> (when (string= (symbol-name atom)
> "xyzw")
> (error "Found %s" atom))))
>
>
>
Please, why the comma before sym -- quoted, no less:
> (put ',sym 'some 'value))))
Thanks!
David
next prev parent reply other threads:[~2008-09-14 20:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-25 16:56 eval trouble Lennart Borgman (gmail)
2008-08-25 17:08 ` Lennart Borgman (gmail)
[not found] ` <mailman.17509.1219684131.18990.help-gnu-emacs@gnu.org>
2008-08-25 17:43 ` Pascal J. Bourguignon
2008-08-25 17:45 ` Lennart Borgman (gmail)
2008-08-25 18:47 ` Pascal J. Bourguignon
2008-08-25 18:34 ` Lennart Borgman (gmail)
[not found] ` <mailman.17512.1219686348.18990.help-gnu-emacs@gnu.org>
2008-08-25 19:50 ` David Kastrup
2008-08-25 20:59 ` Lennart Borgman (gmail)
[not found] ` <mailman.17522.1219697977.18990.help-gnu-emacs@gnu.org>
2008-08-25 21:36 ` David Kastrup
2008-08-25 21:43 ` Lennart Borgman (gmail)
2008-09-14 20:57 ` David Combs [this message]
2008-09-14 22:20 ` Drew Adams
2008-09-17 7:51 ` Kevin Rodgers
[not found] ` <mailman.19402.1221638109.18990.help-gnu-emacs@gnu.org>
2008-09-22 19:59 ` David Combs
2008-08-25 19:48 ` David Kastrup
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='gajts3$9i7$1@reader1.panix.com' \
--to=dkcombs@panix.com \
--cc=help-gnu-emacs@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.
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).