From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.help Subject: RE: Are two symbols `equal' iff they are `eq'? Date: Sun, 9 Aug 2015 08:28:48 -0700 (PDT) Message-ID: <512e2ad3-cc22-4500-8835-ee030b386689@default> References: <87wpx5ia6y.fsf@mbork.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1439134160 18951 80.91.229.3 (9 Aug 2015 15:29:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 15:29:20 +0000 (UTC) To: Marcin Borkowski , Help Gnu Emacs mailing list Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 09 17:29:08 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZOSX5-00062x-Cy for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 17:29:07 +0200 Original-Received: from localhost ([::1]:55514 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOSX4-0004EJ-HU for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 11:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOSWt-0004E2-9f for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 11:28:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOSWo-0003up-B0 for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 11:28:55 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:34602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOSWo-0003ua-4h for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 11:28:50 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t79FSmkx004757 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 9 Aug 2015 15:28:48 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t79FSl02028185 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 9 Aug 2015 15:28:47 GMT Original-Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t79FSlEV019769; Sun, 9 Aug 2015 15:28:47 GMT In-Reply-To: <87wpx5ia6y.fsf@mbork.pl> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106399 Archived-At: > As in the subject; neither the manual nor the docstring for `equal' > are very clear on this. (The docstring for `equal' says: "Symbols must > match exactly.", which -- I would guess -- means `eq', but I'm not > sure.) Yes. `equal' requires symbols to have the same name, value, function definition, and plist, and to be interned in the same obarray. They need to be the same Lisp object (a symbol). In sum: they need to be `eq'. Emacs Lisp doesn't have a spec (just its code, and some doc). But this is what the Common Lisp spec says about `equal' for symbols: Returns true if x and y are structurally similar (isomorphic) objects. Objects are treated as follows by equal. * Symbols, Numbers, and Characters equal is true of two objects if they are symbols that are eq, ^^^^^^^^^^^^^^^^^^^ if they are numbers that are eql, or if they are characters that are eql.