From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: tomas@tuxteam.de Newsgroups: gmane.emacs.help Subject: Re: `compare-strings' style question Date: Thu, 19 Nov 2009 16:27:13 +0100 Message-ID: <20091119152713.GA8204@tomas> References: <878we2kakq.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; x-action=pgp-signed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258647617 28065 80.91.229.12 (19 Nov 2009 16:20:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 19 Nov 2009 16:20:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 19 17:20:10 2009 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 1NB9jo-0003Qb-5K for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 17:20:04 +0100 Original-Received: from localhost ([127.0.0.1]:60382 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB9jn-00085T-Fk for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Nov 2009 11:20:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NB91r-0004YZ-BV for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:34:39 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NB91m-0004VH-A6 for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:34:38 -0500 Original-Received: from [199.232.76.173] (port=35960 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NB91l-0004V3-Vf for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:34:34 -0500 Original-Received: from alextrapp1.equinoxe.de ([217.22.192.104]:44948 helo=www.elogos.de) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NB91l-0006dH-F3 for help-gnu-emacs@gnu.org; Thu, 19 Nov 2009 10:34:33 -0500 Original-Received: by www.elogos.de (Postfix, from userid 1000) id 6CF9C90048; Thu, 19 Nov 2009 16:27:13 +0100 (CET) Content-Disposition: inline In-Reply-To: <878we2kakq.fsf@lola.goethe.zz> User-Agent: Mutt/1.5.15+20070412 (2007-04-11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) 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:69928 Archived-At: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thu, Nov 19, 2009 at 12:39:33PM +0100, David Kastrup wrote: > tomas@tuxteam.de writes: >=20 > > Hi, > > > > In Elisp, I'm trying to test whether a string is a prefix of another. [...] > > (when (eq (compare-strings foo 0 5 bar 0 5) t) > > ...) > > > > which looks rather funny. My question: are there better idioms? Am I > > barking up the wrong function? >=20 > (unless (numberp ... >=20 > or >=20 > (if (symbolp ... Thanks. Still looks a bit funna, though :-) - -- tom=C3=A1s -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFLBWPRBcgs9XrR2kYRApRJAJ9guSeaRTlxcPeyZWLvuge/cKNcTACePSkC xRlUc9OmZFWlsvvH7jdoGmM=3D =3DWv1D -----END PGP SIGNATURE-----