From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: abbreviation ending with "." Date: Mon, 16 Nov 2009 11:34:21 +0100 Organization: http://groups.google.com Message-ID: <87d43iiwr6.fsf@ergodik.univ-brest.fr> References: <6713e8a2-fc67-4250-b8c3-d20894d51f0b@m26g2000yqb.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1258368204 30994 80.91.229.12 (16 Nov 2009 10:43:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Nov 2009 10:43:24 +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 11:43:17 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 1N9z3B-0007gw-8d for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 11:43:13 +0100 Original-Received: from localhost ([127.0.0.1]:43852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N9z3A-0006TI-RT for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Nov 2009 05:43:12 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!kanaga.switch.ch!switch.ch!news.in2p3.fr!in2p3.fr!news.ecp.fr!crihan.fr!news.univ-brest.fr!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: mathw171.univ-brest.fr Original-X-Trace: news.univ-brest.fr 1258367778 21452 172.19.130.171 (16 Nov 2009 10:36:18 GMT) Original-X-Complaints-To: usenet@news.univ-brest.fr Original-NNTP-Posting-Date: 16 Nov 2009 10:36:18 GMT User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:XN519t8VYShYdyunj1VGMJ5gOMM= Original-Xref: news.stanford.edu gnu.emacs.help:174698 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:69772 Archived-At: 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. 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"