From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leschinsky Oleg Newsgroups: gmane.emacs.help Subject: Re: Abbrev-mode question Date: Wed, 12 Sep 2007 12:20:16 +0300 Message-ID: <87ejh4z1db.fsf@leschinsky.in.ua> References: <87abrt8rdd.fsf@leschinsky.in.ua> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1189588849 23432 80.91.229.12 (12 Sep 2007 09:20:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 12 Sep 2007 09:20:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 12 11:20:46 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IVOOr-000761-Mf for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2007 11:20:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVOOq-0004iB-8s for geh-help-gnu-emacs@m.gmane.org; Wed, 12 Sep 2007 05:20:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IVOOT-0004hg-F3 for help-gnu-emacs@gnu.org; Wed, 12 Sep 2007 05:20:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IVOOS-0004hQ-Jl for help-gnu-emacs@gnu.org; Wed, 12 Sep 2007 05:20:20 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IVOOS-0004hJ-8f for help-gnu-emacs@gnu.org; Wed, 12 Sep 2007 05:20:20 -0400 Original-Received: from leschinsky.in.ua ([82.193.101.91]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IVOOR-0002Fa-Vf for help-gnu-emacs@gnu.org; Wed, 12 Sep 2007 05:20:20 -0400 Original-Received: from helge by leschinsky.in.ua with local (Exim 4.67) (envelope-from ) id 1IVOOO-00020r-Tk for help-gnu-emacs@gnu.org; Wed, 12 Sep 2007 12:20:16 +0300 In-Reply-To: (Stefan Monnier's message of "Wed, 12 Sep 2007 02:13:32 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) X-Detected-Kernel: Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:47524 Archived-At: Evening, Stefan Monnier. Stefan Monnier 02:13 12/9/2007 wrote: SM> An abbrev-mode in ELisp with the same behavior as the current one is SM> about as fast as it is in C. Extending it to multi-word abbrevs might SM> slow it down significantly, but that's also true in C. The main issue SM> is rather how to avoid the slowdown, which depends on further info: SM> - how many multi-word abbrevs are we talking about? Several hundreds. No more than thousand. SM> - how can we determine the start (so as not to mistake "afool bo" for a case where SM> the "ol bo" abbrev should be expanded)? Should it also necessarily SM> start with a word boundary? As this is for text in natual language, abbrevs start and end on word boundaries. SM> - can be put a reasonable upper limit on SM> the number of words in a multi-word abbrev (2 or 3, maybe)? 5 words is a limit. SM> Stefan "whose abbrev-mode is all written in ELisp"