* Re: intern vs. make-symbol
[not found] <mailman.19532.1360525339.855.help-gnu-emacs@gnu.org>
@ 2013-02-10 20:46 ` tom.capey
0 siblings, 0 replies; 4+ messages in thread
From: tom.capey @ 2013-02-10 20:46 UTC (permalink / raw)
To: gnu.emacs.help; +Cc: help-gnu-emacs
On Sunday, February 10, 2013 7:42:01 PM UTC, Thorsten Jolitz wrote:
> Hi List,
> assume org-babel-load-languages is similar to:
> ,-------------------------------
>
> | ((emacs-lisp . t) (python . t))
>
> `-------------------------------
> Shouldn't this
> ,------------------------------------------------------
>
> | (assq (intern "emacs-lisp") org-babel-load-languages)
>
> | (emacs-lisp . t)
>
> `------------------------------------------------------
> and this
> ,--------------------------------------------------
>
> | (assq (eval `(quote ,(make-symbol "emacs-lisp")))
>
> | org-babel-load-languages)
>
> | nil
>
> `--------------------------------------------------
> give the same results - and why isn't this so?
They do different things. Try these:
(eql (make-symbol "emacs-lisp")
(make-symbol "emacs-lisp"))
=> nil
(eql (intern "emacs-lisp")
(intern "emacs-lisp"))
=> t
`make-symbol' "[r]eturn[s] a newly allocated uninterned symbol whose name is NAME.
Its value and function definition are void, and its property list is nil."
`intern' "[r]eturn[s] the canonical symbol whose name is STRING.
If there is none, one is created by this function and returned.
A second optional argument specifies the obarray to use;
it defaults to the value of `obarray'."
/Tom
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* intern vs. make-symbol
@ 2013-02-10 19:42 Thorsten Jolitz
2013-02-11 1:33 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Jolitz @ 2013-02-10 19:42 UTC (permalink / raw)
To: help-gnu-emacs
Hi List,
assume org-babel-load-languages is similar to:
,-------------------------------
| ((emacs-lisp . t) (python . t))
`-------------------------------
Shouldn't this
,------------------------------------------------------
| (assq (intern "emacs-lisp") org-babel-load-languages)
| (emacs-lisp . t)
`------------------------------------------------------
and this
,--------------------------------------------------
| (assq (eval `(quote ,(make-symbol "emacs-lisp")))
| org-babel-load-languages)
| nil
`--------------------------------------------------
give the same results - and why isn't this so?
--
cheers,
Thorsten
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-11 1:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.19532.1360525339.855.help-gnu-emacs@gnu.org>
2013-02-10 20:46 ` intern vs. make-symbol tom.capey
2013-02-10 19:42 Thorsten Jolitz
2013-02-11 1:33 ` Stefan Monnier
2013-02-11 1:42 ` Thorsten Jolitz
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.