From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Are two symbols `equal' iff they are `eq'? Date: Sun, 09 Aug 2015 21:41:24 +0200 Message-ID: <87io8os10b.fsf@mbork.pl> References: <20150809051452.23051.3919A296@ahiker.mooo.com> <87a8u07wce.fsf@mbork.pl> <871tfctv49.fsf@web.de> <87si7s5whd.fsf@mbork.pl> <83tws8pk0g.fsf@gnu.org> <87pp2w5uuc.fsf@mbork.pl> <83si7spbna.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1439149321 8297 80.91.229.3 (9 Aug 2015 19:42:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Aug 2015 19:42:01 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Aug 09 21:41:54 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 1ZOWTi-0000qp-5L for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 21:41:54 +0200 Original-Received: from localhost ([::1]:56053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOWTh-00012l-3I for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Aug 2015 15:41:53 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46827) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOWTW-00012e-Pt for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 15:41:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZOWTS-0000gm-Pw for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 15:41:42 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:50413) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZOWTS-0000gi-I8 for help-gnu-emacs@gnu.org; Sun, 09 Aug 2015 15:41:38 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 675AE6F2004 for ; Sun, 9 Aug 2015 21:41:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Y6T9dyy5nSz for ; Sun, 9 Aug 2015 21:41:33 +0200 (CEST) Original-Received: from localhost (unknown [109.232.24.146]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 72F956F2003 for ; Sun, 9 Aug 2015 21:41:33 +0200 (CEST) In-reply-to: <83si7spbna.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a01:5e00:2:52::8 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:106419 Archived-At: On 2015-08-09, at 20:19, Eli Zaretskii wrote: >> From: Marcin Borkowski >> Date: Sun, 09 Aug 2015 17:45:31 +0200 >> >> >> >From the capitalization I would guess that QUIT is a C macro. From its >> >> name I would guess that anything after it is irrelevant;-). Well, >> >> joking aside, I found its definition in the source; do I get it right >> >> that it quits if something like C-g happens? >> > >> > Yes. >> > >> >> If yes, I'd be curious why it is here. >> > >> > To allow the user to interrupt a (potentially) long operation. >> >> That's obvious, I just wondered why at this point. > > Because that point is traversed every recursion, so we check for C-g > on each "iteration", so to say. Ah, I see. That does make sense. Thanks! >> >> Apart from that, it seems that I was right: `equal' for >> >> symbols just calls `eq' (C EQ, not Lisp eq, to be more precise). >> > >> > What else could it possibly do? >> >> It could e.g. compare the string representation, so two symbols with the >> same name but in different obarrays, or one interned and the other not, >> could be equal but not eq. > > I'm sure you understand how all of those would make no sense as > "equality" of any kind. Frankly, I don't. I don't really have enough experience with the very ideas of a "symbol", of "interning" and of an "obarray" (in particular, having many of them) to see this. I guess when I learn more Lisp (maybe Common Lisp?), I'll see this. But I believe you, and this is enough for me now - I'll just try to keep that issue in my mind during my further studies, and maybe I'll get it some day. I'm not in a hurry, you know;-). >> (I'm not sure whether this would be useful, though - just a >> thought.) > > If it won't be useful, why would someone do it? If not, then not. I agree. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University