all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: abbreviation ending with "."
Date: Wed, 11 Nov 2009 23:30:47 -0500	[thread overview]
Message-ID: <jwv639gjrna.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: 6713e8a2-fc67-4250-b8c3-d20894d51f0b@m26g2000yqb.googlegroups.com

> 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*")

See C-h v define-abbrev-table to see the default value used for
the :regexp (to which I just added \\.?).


        Stefan


  reply	other threads:[~2009-11-12  4:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-12  0:30 abbreviation ending with "." finotti
2009-11-12  4:30 ` Stefan Monnier [this message]
2009-11-12 16:28   ` finotti
2009-11-14  8:11     ` Stefan Monnier
2009-11-16 10:34   ` harven
2009-11-16 11:08     ` Andreas Röhler
     [not found]     ` <mailman.10801.1258369753.2239.help-gnu-emacs@gnu.org>
2009-11-16 14:54       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv639gjrna.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.