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: Sun, 7 Nov 2021 09:01:21 +0900

Thank you Stephan for checking all that.

> On Nov 7, 2021, at 7:32, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
> I tried the above and then `M-x expand-abbrev` and it worked for my test
> case, so I guess the problem is in the auto-triggering of abbrevs down
> in `self-insert-command`.
> 
> And indeed I see:
> 
>    if (!NILP (BVAR (current_buffer, abbrev_mode))
>        && synt != Sword
>        && NILP (BVAR (current_buffer, read_only))
>        && PT > BEGV
>        && (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters))
>                    ? XFIXNAT (Fprevious_char ())
>                    : UNIBYTE_TO_CHAR (XFIXNAT (Fprevious_char ())))
>            == Sword))
> 
> 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...

> You might want to `M-x report-emacs-bug` and request that this
> constraint be made more flexible.

I will. Thank you again.

-- 
Jean-Christophe Helary @brandelune
https://mac4translators.blogspot.com
https://sr.ht/~brandelune/omegat-as-a-book/




reply via email to

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