From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: Compiling Elisp to a native code with a GCC plugin Date: Wed, 15 Sep 2010 18:37:40 +0200 Organization: Organization?!? Message-ID: <8739tbhsiz.fsf@lola.goethe.zz> References: <87bp805ecr.fsf@gmail.com> <87bp7zhu0j.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284568881 29008 80.91.229.12 (15 Sep 2010 16:41:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 15 Sep 2010 16:41:21 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Sep 15 18:41:20 2010 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.69) (envelope-from ) id 1Ovv2t-0006Uu-KA for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2010 18:41:19 +0200 Original-Received: from localhost ([127.0.0.1]:60294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovv2s-0006HR-SR for ged-emacs-devel@m.gmane.org; Wed, 15 Sep 2010 12:41:18 -0400 Original-Received: from [140.186.70.92] (port=49137 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ovv0C-0003ks-42 for emacs-devel@gnu.org; Wed, 15 Sep 2010 12:39:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OvuzZ-0001yM-ND for emacs-devel@gnu.org; Wed, 15 Sep 2010 12:38:30 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:39502) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OvuzZ-0001xh-CM for emacs-devel@gnu.org; Wed, 15 Sep 2010 12:37:53 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OvuzV-0004eL-V6 for emacs-devel@gnu.org; Wed, 15 Sep 2010 18:37:49 +0200 Original-Received: from p508edc0b.dip.t-dialin.net ([80.142.220.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Sep 2010 18:37:49 +0200 Original-Received: from dak by p508edc0b.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Sep 2010 18:37:49 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508edc0b.dip.t-dialin.net X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:Bfpg9jy22zwcucs1OOYwa6b7uCM= X-detected-operating-system: by eggs.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:130227 Archived-At: Leo writes: > On 2010-09-15 17:05 +0100, David Kastrup wrote: >> Leo writes: >> >>> On 2010-09-15 16:51 +0100, Lars Magne Ingebrigtsen wrote: >>>> looking-at probably compiles the regexp, so there might be unnecessary >>>> overhead there. (The regexp compilation and caching and stuff.) >>>> >>>> Is there any function like >>>> >>>> (is-the-string-following-point-equal-to-this-string-p "foo ") >>>> >>>> in Emacs that I've overlooked somehow? >>> >>> Can you build one using compare-strings? >> >> More likely compare-buffer-substrings. It would be nicer if >> compare-strings just accepted a buffer as either of its string >> arguments. Sure, one can use buffer-substring-no-properties with >> compare-strings or (with-temp-buffer (insert ... with >> compare-buffer-substrings, but that feels clumsy in comparison. > > These two functions look similar, any idea why not extend > compare-strings as David suggested? A plausible reason would be that it is not trivial to do and nobody needed it so far. Lars sounds like he would be better served with looking-at getting an optional "LITERAL" argument making it do its job without involving the regexp machinery. Of course, he could just try something like (search-forward string (+ (point) (length string)) t) which should work just fine in his case. In particular since he appears to want to move beyond the match (if any) anyhow. -- David Kastrup