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: Thu, 16 Sep 2010 08:54:28 +0200 Organization: Organization?!? Message-ID: <874odqfaaj.fsf@lola.goethe.zz> References: <87bp805ecr.fsf@gmail.com> <87iq26z97e.fsf@uwakimon.sk.tsukuba.ac.jp> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1284620092 32103 80.91.229.12 (16 Sep 2010 06:54:52 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Sep 2010 06:54:52 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 16 08:54:52 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 1Ow8Ms-0007nk-1M for ged-emacs-devel@m.gmane.org; Thu, 16 Sep 2010 08:54:50 +0200 Original-Received: from localhost ([127.0.0.1]:57306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ow8Mr-0001Wd-LM for ged-emacs-devel@m.gmane.org; Thu, 16 Sep 2010 02:54:49 -0400 Original-Received: from [140.186.70.92] (port=44715 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ow8Ml-0001Vg-Kg for emacs-devel@gnu.org; Thu, 16 Sep 2010 02:54:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Ow8Mk-0000Ai-6g for emacs-devel@gnu.org; Thu, 16 Sep 2010 02:54:43 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:55218) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Ow8Mk-0000AQ-0O for emacs-devel@gnu.org; Thu, 16 Sep 2010 02:54:42 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ow8Mf-0007hQ-DT for emacs-devel@gnu.org; Thu, 16 Sep 2010 08:54:37 +0200 Original-Received: from p508edda0.dip.t-dialin.net ([80.142.221.160]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Sep 2010 08:54:37 +0200 Original-Received: from dak by p508edda0.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 16 Sep 2010 08:54:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 29 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: p508edda0.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:PFQPd6UHP/tEfH0PPfHnvN244hc= 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:130246 Archived-At: "Stephen J. Turnbull" writes: > Lars Magne Ingebrigtsen writes: > > > Is there any function like > > > > (is-the-string-following-point-equal-to-this-string-p "foo ") > > Does every one-line function need to be a built-in? > > (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. -- David Kastrup