From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Seb Newsgroups: gmane.emacs.help Subject: Re: checking for nil argument in interactive Date: Sun, 09 Nov 2008 15:26:09 -0600 Organization: Church of Emacs Message-ID: <877i7cr3pq.fsf@patagonia.sebmags.homelinux.org> References: <87ej1kr51p.fsf@patagonia.sebmags.homelinux.org> <87wsfc1trh.fsf@thinkpad.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1226266025 27854 80.91.229.12 (9 Nov 2008 21:27:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2008 21:27:05 +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 Nov 09 22:28:08 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KzHpF-0004po-TB for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Nov 2008 22:28:06 +0100 Original-Received: from localhost ([127.0.0.1]:37045 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzHo7-00032r-JR for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Nov 2008 16:26:55 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzHnd-00032e-Pg for help-gnu-emacs@gnu.org; Sun, 09 Nov 2008 16:26:25 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzHnc-00032S-0q for help-gnu-emacs@gnu.org; Sun, 09 Nov 2008 16:26:25 -0500 Original-Received: from [199.232.76.173] (port=59290 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzHnb-00032P-H3 for help-gnu-emacs@gnu.org; Sun, 09 Nov 2008 16:26:23 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:48453 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KzHna-00057S-TI for help-gnu-emacs@gnu.org; Sun, 09 Nov 2008 16:26:23 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1KzHnU-0005mH-HN for help-gnu-emacs@gnu.org; Sun, 09 Nov 2008 21:26:16 +0000 Original-Received: from s01060015e975d7fb.wp.shawcable.net ([24.77.75.70]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Nov 2008 21:26:16 +0000 Original-Received: from spluque by s01060015e975d7fb.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Nov 2008 21:26:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 31 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: s01060015e975d7fb.wp.shawcable.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:/HQg0MByaK8LaabKsmdgY9uPxMY= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:59595 Archived-At: On Sun, 09 Nov 2008 22:20:18 +0100, Tassilo Horn wrote: > See the manual for details. ,----[ (info "(elisp)Equality > Predicates") ] >> -- Function: eq object1 object2 This function returns `t' if OBJECT1 >> and OBJECT2 are the same object, `nil' otherwise. >> >> `eq' returns `t' if OBJECT1 and OBJECT2 are integers with the same >> value. Also, since symbol names are normally unique, if the >> arguments are symbols with the same name, they are `eq'. For other >> types (e.g., lists, vectors, strings), two arguments with the same >> contents or elements are not necessarily `eq' to each other: they are >> `eq' only if they are the same object, meaning that a change in the >> contents of one will be reflected by the same change in the contents >> of the other. >> >> (eq 'foo 'foo) => t >> >> (eq 456 456) => t >> >> (eq "asdf" "asdf") => nil > `---- > So to compare stings use `string='. Thanks Tassilo! -- Seb