Subject: bug#45944: 28.0.50; Mailabbrev sometimes hangs

From: Katsumi Yamaoka <[email-masked]>
Date: Tue, 19 Jan 2021 20:07:36 +0900

Andreas Schwab <[email-masked]> wrote:
> On Jan 19 2021, Lars Ingebrigtsen wrote:
>> And I guess there's some extreme backtracking going on with the
>>   \\(\\w\\|[_.]\\)+>
>> part?
> Does `\w' match `_'?

Yes it does.  While the hang arises, syntax table is overridden
temporarily with `mail-abbrev-syntax-table'.

(mail-abbrev-make-syntax-table)
(with-syntax-table mail-abbrev-syntax-table
  (string-match "\\w" "_"))

So, it explains some strange things, doesn't it?  Actually, this
advice looks to solve the problem:

(defadvice message--syntax-propertize (around use-standard-syntax-table
                                              activate)
  "Use standard-syntax-table."
  (with-syntax-table (standard-syntax-table)
    ad-do-it))