[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compiling Elisp to a native code with a GCC plugin
From: |
David Kastrup |
Subject: |
Re: Compiling Elisp to a native code with a GCC plugin |
Date: |
Wed, 15 Sep 2010 18:37:40 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Leo <address@hidden> writes:
> On 2010-09-15 17:05 +0100, David Kastrup wrote:
>> Leo <address@hidden> 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
- Re: Compiling Elisp to a native code with a GCC plugin, (continued)
- Re: Compiling Elisp to a native code with a GCC plugin, Stefan Monnier, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Leo, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, Leo, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin,
David Kastrup <=
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Eli Zaretskii, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Eli Zaretskii, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/17
- Re: Compiling Elisp to a native code with a GCC plugin, Lars Magne Ingebrigtsen, 2010/09/16
- Re: Compiling Elisp to a native code with a GCC plugin, Stephen J. Turnbull, 2010/09/15
- Re: Compiling Elisp to a native code with a GCC plugin, David Kastrup, 2010/09/16