From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: abbreviation ending with "." Date: Mon, 16 Nov 2009 12:08:15 +0100 Message-ID: <4B01329F.4020308@easy-emacs.de> References: <6713e8a2-fc67-4250-b8c3-d20894d51f0b@m26g2000yqb.googlegroups.com> <87d43iiwr6.fsf@ergodik.univ-brest.fr> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258369843 3989 80.91.229.12 (16 Nov 2009 11:10:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2009 11:10:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 16 12:10:36 2009 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 1N9zTe-0001Vz-S6 for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 12:10:35 +0100 Original-Received: from localhost ([127.0.0.1]:60330 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9zTe-0001Wr-8H for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 06:10:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N9zSI-00015A-KL for help-gnu-emacs@gnu.org; Mon, 16 Nov 2009 06:09:10 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N9zSD-00011V-3h for help-gnu-emacs@gnu.org; Mon, 16 Nov 2009 06:09:09 -0500 Original-Received: from [199.232.76.173] (port=37587 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9zSC-00011B-Hd for help-gnu-emacs@gnu.org; Mon, 16 Nov 2009 06:09:04 -0500 Original-Received: from moutng.kundenserver.de ([212.227.17.9]:55392) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N9zSB-0002St-Uf for help-gnu-emacs@gnu.org; Mon, 16 Nov 2009 06:09:04 -0500 Original-Received: from [192.168.178.27] (p54BE89CA.dip0.t-ipconnect.de [84.190.137.202]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lj4vO-1NnBYG2bGg-00civD; Mon, 16 Nov 2009 12:09:02 +0100 User-Agent: Thunderbird 2.0.0.19 (X11/20081227) In-Reply-To: <87d43iiwr6.fsf@ergodik.univ-brest.fr> X-Provags-ID: V01U2FsdGVkX1/b1kYyJKsFwJARIb2Q0G08SSSnypUx8U022QW JwFGls3ZQFk7kPWxNk4TciF3sWxRR0M0IQUiHZccp2NHXgUpWx nO1EHTfg/ZMQBBDIxo00QfDu9YdeQvvZyIH+rZJaWQ= X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:69774 Archived-At: harven wrote: > Stefan Monnier writes: > >>> I want to have an abbreviation that turns "p." into "para" >>> (Portuguese). But all my abbreviations that end with "." are not >>> expanded. I googled around and could not find anything on this. >> Abbreviations by default only work if they're exclusively made up of >> "word chars" (a.k.a chars of syntax class "word"). >> >> So you can either change the char "." to be a word constituent (which >> may lead to surprises), or you can change the setting on the >> abbrev-table in which you placed that "p." abbreviation. >> >> E.g. if it's added to the abbrev table named `foo-abbrev-table', you >> could do >> >> (abbrev-table-put foo-abbrev-table >> :regexp "\\<\\(\\w+\\.?\\)\\W*") > > This does not seem to work. I tried the following with emacs -Q > > (progn > (setq abbrev-mode t) > (define-abbrev-table 'my-abbrev-table '( > ("success" "success again") > ("try." "try again"))) > (abbrev-table-put my-abbrev-table > :regexp "\\<\\(\\w+\\.?\\)\\W*") > (setq local-abbrev-table my-abbrev-table)) > > success expands as success again. > try. does not expand. > Here an explizit 'M-x expand-abbrev' does it, but not. Seems a bug somewhere. Andreas -- https://code.launchpad.net/s-x-emacs-werkstatt/ http://bazaar.launchpad.net/~a-roehler/python-mode/python-mode.el/ > Strange enough, If I try to make a new expansion for "try." with C-x a i l, > it says that I am trying to overwrite the "try. -> try again" expansion, but > there is still no expansion. What am I doing wrong ? > > I am running "GNU Emacs 23.1.1 (i486-pc-linux-gnu, GTK+ Version 2.16.5) of 2009-09-14 on raven, modified by Debian" >