|
From: | Andrew L. Moore |
Subject: | bug#54218: [PATCH] Magic number regexp shouldn't match beyond end-of-line. |
Date: | Thu, 3 Mar 2022 14:57:06 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 |
On 3/3/22 09:42, Lars Ingebrigtsen wrote:
"Andrew L. Moore" <slewsys@gmail.com> writes:Repeat magic number search to work around match-data loss when `save-window-excursion' is called.I think it would perhaps make more sense to just save the match data instead of repeating the match, so I've now done so in Emacs 29
Yes, this resolves the issues that I was seeing. For the record, I'm not able to reproduce the data loss with vanilla Emacs by calling `executable-set-magic' manually. It occurs (for me) when `executable-set-magic' is called automatically from a minor mode. In any case, your patch fixes my minor mode and does no harm. The other issue that I attributed to the regexp matching beyond EOL was caused by `replace-match' being called by incorrect or uninitialized match data. Your patch resolves this as well. Thank you!
[Prev in Thread] | Current Thread | [Next in Thread] |