[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non word abbrevs
From: |
Stefan Monnier |
Subject: |
Re: non word abbrevs |
Date: |
Sat, 06 Nov 2021 23:15:14 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
>> so it looks like the "auto expand abbrev" feature only works right after
>> a word char, so basically only works for abbrevs whose last char has
>> word syntax.
> Which kind of defeats the idea of being able to define a regex in the first
> place...
Not completely: the original motivation for adding that `:regexp`
keyword was to handle abbrevs of the form "`foo" as well as others of
the form "foo/bar" ;-)
>> You might want to `M-x report-emacs-bug` and request that this
>> constraint be made more flexible.
> I will. Thank you again.
In the mean time, you might be able to implement
a `post-self-insert-hook` which runs expands your abbrevs.
You could start with something like:
(add-hook 'post-self-insert-hook #'my-expand-arrow-abbrevs)
(defun my-expand-arrow-abbrevs ()
(if (memq (char-before) '(?= ?< ?-))
(expand-abbrev)))
-- Stefan
- Re: non word abbrevs, (continued)
- Re: non word abbrevs, Stefan Monnier, 2021/11/01
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/01
- Re: non word abbrevs, Stefan Monnier, 2021/11/01
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/01
- Re: non word abbrevs, Leo Butler, 2021/11/01
- Re: non word abbrevs, tomas, 2021/11/01
- Re: non word abbrevs, Stefan Monnier, 2021/11/01
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/06
- Re: non word abbrevs, Stefan Monnier, 2021/11/06
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/06
- Re: non word abbrevs,
Stefan Monnier <=
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/06
- Re: non word abbrevs, Emanuel Berg, 2021/11/07
- Re: non word abbrevs, Kevin Vigouroux, 2021/11/08
- Re: non word abbrevs, Jean-Christophe Helary, 2021/11/08
- Re: non word abbrevs, Stefan Monnier, 2021/11/08
- Re: non word abbrevs, Emanuel Berg, 2021/11/07