Original upstream bug report: https://debbugs.gnu.org/82213
The fix here incorporates two upstream commits:
- 205ae0b0583: This is the fix included in the bug report.
- 5bf385dad6e: This fixes a follow-up regression where files such as foo.el.orig were left in fundamental-mode.
MFH: 2026Q4
Security: 05eaad8b-e202-11f1-85bb-1c697a616631
Sponsored by: The FreeBSD Foundation