emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling Elisp to a native code with a GCC plugin


From: Lars Magne Ingebrigtsen
Subject: Re: Compiling Elisp to a native code with a GCC plugin
Date: Wed, 15 Sep 2010 17:51:17 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> So you end up with
>> (or (looking-at "foo ") (search-forward "\nfoo "))
>> which creates a regexp, anyway, and seems clumsy.
>
> Unless the text you match is short, the above is probably the fastest, indeed.
> There is no built-in support for the above idiom, OTOH, so you have to
> pay for the extra Elisp interpretation overhead of calling looking-at
> and then search-forward.

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?

-- 
(domestic pets only, the antidote for overdose, milk.)
  address@hidden * Lars Magne Ingebrigtsen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]