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 21:13:24 +0900


> On Nov 1, 2021, at 21:03, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> 
>>    :regexp "\(<?[-=]>?\)")
>> I must be missing something.
> 
> Hmmm... backslashes?  ;-)
> The above string is the same as "(<?[-=]>?)" (in recentish Emacsen the
> above backslashes should presumably be highlighted in
> a font-lock-warning color for that reason).

I'm trying in *scratch* with lisp-mode on a recent "master" and I don't get 
that...

> Beware also that this regexp is matched backwards and stops as soon as
> it finds a match, so it finds the *shortest* match rather than the
> longest match.  IOW the <? part will always match the empty string.

I've changed it to:

:regexp "\\([<>=-]+\\)"

this time using: 

(setq local-abbrev-table arrows-abbrev-table)

And I get a nice message that reads like this:

[## 0 0 0 0 0 0 0 0 0 0 <== <=> 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ==> 0 0 0 
0 0 0 0 0 0 <- 0 0 0 0 0 0 0 0 <-> 0 0 0 -> 0 0 0]

And I guess that's a list that includes possible matches but I'm not seeing => 
/ <= so I wonder.

Then, I enable abbrev-mode but nothing gets transformed...

:-( Jean-Christophe 


reply via email to

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