bug#81516: 31.0.91; delete-file-local-variable(-prop-line) should delete "Local Variables" block (prop-line)

Daniel Mendler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
Eli Zaretskii <[email protected]> writes:

>> From: Daniel Mendler <[email protected]>
>> Cc: [email protected]
>> Date: Wed, 29 Jul 2026 16:55:27 +0200
>> 
>> Eli Zaretskii <[email protected]> writes:
>> 
>> >> I suggest to handle both deletion commands the same, remove the faulty
>> >> prop line, and also the empty local variables block.
>> >
>> > Why?
>> 
>> Why not?
>
> Because a line like that could be present in a Lisp file regardless of
> local vars, and signaling an error when visiting such a file is a
> clear bug, IMO.  So we need to fix the error regardless, and removing
> the remnants of the local vars just sweeps the problem under the
> carpet.

I fully agree that the error needs to be fixed regardless.

But on top of that, the empty local variable block and empty prop line
should get removed by the delete-file-local-variable(-prop-line)
commands. There is no point in keeping this cruft around, even if it
does not hurt after fixing the other problem. The point is not to sweep
anything under the rug.

Daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.