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]> |
> Date: Wed, 29 Jul 2026 15:02:38 +0200 > From: Daniel Mendler via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <[email protected]> > > When delete-file-local-variable is called for the last file-local > variable, the "Local Variables" block is not removed. Similarly for > delete-file-local-variable-prop-line, a remnant of the prop-line > remains: ;; -*- -*- > > While the remnants are not highly problematic, one still gets an error > when the file is opened the next time: > > 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. I personally am not sure we should remove the empty block, if visiting such a file doesn't signal an error (as I expect).