From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Teemu Likonen Newsgroups: gmane.emacs.devel Subject: Re: delq string element in ido Date: Sat, 26 Dec 2009 14:34:14 +0200 Message-ID: <87my15kj7d.fsf@iki.fi> References: <20a0c1020912260413j733cda64r68141ad90928113c@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1261830939 16033 80.91.229.12 (26 Dec 2009 12:35:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 26 Dec 2009 12:35:39 +0000 (UTC) Cc: Andreas Schwab , Leo , emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 26 13:35:31 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NOVrl-0004QM-QX for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 13:35:30 +0100 Original-Received: from localhost ([127.0.0.1]:52508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOVrm-00054g-56 for ged-emacs-devel@m.gmane.org; Sat, 26 Dec 2009 07:35:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NOVrh-00054Y-GD for emacs-devel@gnu.org; Sat, 26 Dec 2009 07:35:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NOVrc-000540-7u for emacs-devel@gnu.org; Sat, 26 Dec 2009 07:35:24 -0500 Original-Received: from [199.232.76.173] (port=33001 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NOVrc-00053x-2v for emacs-devel@gnu.org; Sat, 26 Dec 2009 07:35:20 -0500 Original-Received: from mta-out.inet.fi ([195.156.147.13]:35399 helo=kirsi1.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NOVrb-0000n8-Hl for emacs-devel@gnu.org; Sat, 26 Dec 2009 07:35:19 -0500 Original-Received: from mithlond.arda.local (84.251.132.215) by kirsi1.inet.fi (8.5.014) id 4B1D0B4D00B5B025; Sat, 26 Dec 2009 14:35:04 +0200 Original-Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1NOVqY-0001mO-2Q; Sat, 26 Dec 2009 14:34:14 +0200 In-Reply-To: <20a0c1020912260413j733cda64r68141ad90928113c@mail.gmail.com> (Leo's message of "Sat, 26 Dec 2009 12:13:22 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118822 Archived-At: On 2009-12-26 12:13 (UTC), Leo wrote: > 2009/12/26 Andreas Schwab : >> Because `eq' returns t for identical Lisp objects. > I don't quite get it. > > If buf holds "str1" and ido-cur-list '("str1" "str2" "str3"), (delq > buf ido-cur-list) does not return '("str2" "str3"). But it does inside > ido-kill-buffer-at-head. That's where I am confused. It's not actually "identical Lisp objects"; eq is about the _same_ Lisp object. Let me demonstrate: (setq my-list (list "one" "two") my-one (car my-list)) Internally my-one and (car my-list) refer to the same Lisp object: (eq my-one (car my-list)) => t But in the following examples the string "one" creates new Lisp object which is different from the one referenced by my-one or (car my-list). (eq "one" (car my-list)) => nil (eq "one" my-one) => nil