unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* :regexp to abbrev table
@ 2010-04-16 10:06 Leo
  2010-04-19  6:29 ` Stefan Monnier
  0 siblings, 1 reply; 12+ messages in thread
From: Leo @ 2010-04-16 10:06 UTC (permalink / raw)
  To: emacs-devel

Hello Stefan and all,

If I want abbrevs to contain symbol, word, or \ (desirable in TeX), how
to construct a :regexp to the abbrev table? (For example, in TikZ, \node
and node are both meaningful, so one would naturally want \n to expand
into \node and n to expand into node).

The abbrev itself should match \\(\\(\\sw\\|\\s_\\|\\s\\\\)+\\). Since
currently :regexp also needs to match part of the text before the
abbrev, how to prepend \\(\\(\\sw\\|\\s_\\|\\s\\\\)+\\) so that abbrevs
can be correctly found? Something similar to \\(\\Sw\\|\\S_\\|\\S\\\\)
but without adding the extra group.

Do you think using greedy looking-back in abbrev--before-point will make
creating the :regexp property easier?

Thanks,

Leo





^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-04-23  3:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-16 10:06 :regexp to abbrev table Leo
2010-04-19  6:29 ` Stefan Monnier
2010-04-19 18:26   ` Leo
     [not found]     ` <jwvljcj8ee1.fsf-monnier+emacs@gnu.org>
2010-04-20 13:37       ` Leo
2010-04-20 15:22         ` Stefan Monnier
2010-04-20 16:32           ` Leo
2010-04-20 18:39             ` Leo
2010-04-21  4:26               ` Stefan Monnier
2010-04-21  6:37                 ` Leo
     [not found]                   ` <jwv4oj46gfy.fsf-monnier+emacs@gnu.org>
2010-04-21 15:09                     ` Leo
     [not found]                       ` <jwvaasw4s7w.fsf-monnier+emacs@gnu.org>
2010-04-21 19:25                         ` Leo
2010-04-23  3:23                           ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).