help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: non word abbrevs


From: Jean-Christophe Helary
Subject: Re: non word abbrevs
Date: Mon, 1 Nov 2021 16:57:20 +0900


> On Nov 1, 2021, at 4:04, Stefan Monnier via Users list for the GNU Emacs text 
> editor <help-gnu-emacs@gnu.org> wrote:
> 
> Jean-Christophe Helary [2021-10-31 14:45:04] wrote:
>> I'm trying to create abbrevs that do this
>> 
>> -> →
>> <- ← 
>> 
>> etc.
>> 
>> but Emacs won't allow that because the abbrevs are not "word constituents".
> 
> You need to change the `:regexp` on your abbrev table.
> See `define-abbrev-table`.

(define-abbrev-table 'arrows-abbrev-table
  '(("->" "→")
    ("<-"  "←")
    ("<->" "⇆")
    ("==>" "⇒")
    ("<==" "⇐")
    ("<=>" "⇔")
    )
    "Arrows as defined on my macOS side."
    :regexp "\(<?[-=]>?\)")

I must be missing something. I evaluate the expression but the abbrevs do not 
work.

Jean-Christophe 


reply via email to

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