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

Eli Zaretskii <[email protected]>
Newsgroups gmane.emacs.bugs
Message-ID <[email protected]>
> From: Stefan Monnier <[email protected]>
> Cc: Daniel Mendler <[email protected]>,  Sean Whitton
>  <[email protected]>,  [email protected]
> Date: Wed, 29 Jul 2026 11:12:58 -0400
> 
> >> 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.
> >
> > How about the patch below?  Stefan and Sean, any comments?
> 
> The patch looks OK to me, and indeed the most important aspect is to
> remove this error.  But I think it's also a good idea to remove the
> overall block in `delete-file-local-variable(-prop-line)` when that
> block becomes empty, as a matter of aesthetics.

Granted, I'm not opposed to removing those, in addition to fixing the
error.
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.