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: Stephen J. Turnbull
Subject: Re: Compiling Elisp to a native code with a GCC plugin
Date: Thu, 16 Sep 2010 17:10:30 +0900

David Kastrup writes:

 > > (defun is-the-string-following-point-equal-to-this-string-p (s)
 > >   (string= s (buffer-substring (point) (+ (point) (length s)))))
 > >
 > > or
 > >
 > > (defun is-the-string-following-point-equal-to-this-string-p (s)
 > >   (search-forward s (+ (point) (length s)) t))

 > The former will signal an error when the string is longer than the
 > rest of the buffer.  The latter won't.
 > 
 > You can't figure this out by reading the doc strings of the used
 > functions.  You have to read their source code.
 > 
 > Since a user is not likely to pick the correct one-liner, it might
 > make sense to define a function for that.

It might, but I would prefer a documentation patch. ;-)



reply via email to

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