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]>
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.

In GNU Emacs 31.0.91 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.49, cairo version 1.18.4) of 2026-07-23
Windowing system distributor 'The X.Org Foundation', version 11.0.12101016
System Description: Debian GNU/Linux 13 (trixie)

Configured using:
 'configure --prefix=$HOME/.local/share/emacs-install
 --without-compress-install --with-tree-sitter=ifavailable
 --with-native-compilation --with-dbus --without-selinux
 --without-threads --disable-gc-mark-trace --without-gsettings
 --without-gpm --with-cairo --with-cairo-xcb --with-xinput2
 --with-x-toolkit=gtk3 --without-toolkit-scroll-bars 'CFLAGS=-O3
 -mtune=native -march=native''

Configured features:
CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS HARFBUZZ JPEG LIBOTF LIBSYSTEMD
LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP
SOUND SQLITE3 TIFF TREE_SITTER WEBP X11 XCOMPOSITE XDBE XFIXES XIM
XINERAMA XINPUT2 XPM XRANDR XRENDER XSHAPE XSYNC GTK3 ZLIB
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.