[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: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Compiling Elisp to a native code with a GCC plugin |
Date: |
Wed, 15 Sep 2010 17:09:16 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
This reminds me of a question I've forgotten to ask.
Many protocols that Gnus parses is such that I need to find some string
that matches the beginning of the line, and I usually do
(re-search-forward "^foo ")
or the like. However, many times the it's really a substring and not a
regexp, and I could say
(search-forward "\nfoo ")
if it weren't for that not matching the first entry in a buffer.
So you end up with
(or (looking-at "foo ") (search-forward "\nfoo "))
which creates a regexp, anyway, and seems clumsy.
So what I wonder is whether there is a smarter way to do this, in
general. (I'm assuming that a simple string search is faster than a
regexp search, but I've never actually benchmarked this.)
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Re: Compiling Elisp to a native code with a GCC plugin, (continued)
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, Stefan Monnier, 2010/09/15
Re: Compiling Elisp to a native code with a GCC plugin, Helmut Eller, 2010/09/15
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 <=
Re: Compiling Elisp to a native code with a GCC plugin, Andreas Schwab, 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, Andreas Schwab, 2010/09/15
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, 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