help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Are two symbols `equal' iff they are `eq'?


From: Stefan Monnier
Subject: Re: Are two symbols `equal' iff they are `eq'?
Date: Sun, 09 Aug 2015 11:59:45 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Do I get it right that for two symbols to be `eq' it is enough for them
> to have the same name and to be interned in the same obarray?

If they're interned, then that's pretty much true, but symbols aren't
all interned.


        Stefan


PS: And then of course, there are major ugly hacks like:

(let* ((ob (make-vector 10 nil))
       (s1 (intern "a" ob))
       (s2 (intern "b" ob)))
  (setf (aref (symbol-name s1) 0) ?b)
  (and (equal (symbol-name s1) (symbol-name s2))
       (not (equal s1 s2))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]