Subject: bug#25391: 24.5; ffap-guesser "stack overflow in regexp matcher" error may crash emacs.

From: Thierry Volpiatto <[email-masked]>
Date: Mon, 09 Jan 2017 08:00:35 +0100

[email-masked] writes:

> tags 25391 patch
> quit
>
> Thierry Volpiatto <[email-masked]> writes:
>>
>> However, this handle the problem with "Stack overflow in regexp matcher"
>> generally, but perhaps regexps such as `ffap-gopher-regexp` could be
>> avoided when possible in emacs source code.
>
> Ah, so by "crash" you meant throw an error.

I had the both, a crash on emacs-26, emacs taking all memory and finally
crashing and on emacs-24.5 "Stack overflow in regexp matcher".

> Right, and ffap-gopher-at-point is also using `set' on local variables,
> icky.  Here's a patch:

I don't know `let-alist`, but looks good, however keeping
`ffap-gopher-regexp` instead of hardcoding it and returning nil when the
regexp is nil would allow users to disable the feature.

Thanks.

-- 
Thierry