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: Daniel Mendler <[email protected]>
> Cc: [email protected]
> Date: Wed, 29 Jul 2026 16:02:04 +0200
> 
> Eli Zaretskii <[email protected]> writes:
> 
> >>   File mode specification error:
> >>   (error "Invalid search bound (wrong side of point)")
> >> 
> >> This suggest that the empty prop line (or the "Local Variables" block)
> >> should better be deleted.
> >
> > I cannot reproduce this error.  I created a file with file-local
> > variables, then invoked delete-file-local-variable several times until
> > all the variables were deleted and what was left was the empty block:
> >
> >   ;; Local Variables:
> >   ;; End:
> >
> > Then I saved the buffer to its file, killed Emacs, and visited the
> > file in a new session -- I saw no errors.
> >
> > If the recipe for reproducing the error is different, please describe
> > it in enough detail for me to be able to reproduce it.
> 
> The error occurs only for delete-file-local-variable-prop-line. There
> the header line ";; -*- -*-" remains which triggers the error the next
> time the file is opened.

Ok, I see that.

> I suggest to handle both deletion commands the same, remove the faulty
> prop line, and also the empty local variables block.

Why?
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.