emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: did the abbrev mechanism ever expand «two words» to «two different w


From: Uwe Brauer
Subject: Re: did the abbrev mechanism ever expand «two words» to «two different words».
Date: Fri, 08 Jan 2021 22:06:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> table?". That can't be both two words separated by a space and a
>> single word at the same time, ie using
>> 
>> "\\(\\w+ \\w+\\)\\|\\(w+\\)

> Note that these regexps will be matched via `re-search-backward` so
> \\(w+\\) will typically only match a single character (it stops at the
> *rightmost* match).

> Another way to go about it is to construct the regexp from the set of
> abbrevs using `regexp-opt`.


Robert's solution works, the only downside is that I need and additional 

    (setq local-abbrev-table (list my-abbrev-table 
fundamental-mode-abbrev-table))

In each buffer which is a bit cumbersome. 

Are you saying this could be avoided using regexp-opt? If so how?

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]