This is a one-line fix for a minor issue in calc-mode. When your last
command has caused the minibuffer to open for input - for example,
you've typed a digit - and you immediately press backspace, it should
clear the minibuffer and return you to *Calculator*. Instead, the
minibuffer is unchanged, and emacs prints the message "Text is
read-only". Note that you can then backspace again to delete the
minibuffer contents as normal; this bug only manifests if you try to
backspace right after the command that puts you in the minibuffer.
The issue is that `calcDigit-backspace' tries to clear the minibuffer with
`erase-buffer', which also tries to delete the prompt, which is
read-only. `delete-minibuffer-contents' would have the desired effect
since it doesn't try to delete the prompt. This change just replaces the
former function with the latter.
In GNU Emacs 29.1 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.38, cairo version 1.17.8) of 2023-09-24 built on
e1d0f5fdfea948b9bb25e212c9c623e4
Windowing system distributor 'The X.Org Foundation', version 11.0.12302002
System Description: Fedora Linux 39 (Workstation Edition)
Configured using:
'configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-dbus --with-gif --with-jpeg --with-png
--with-rsvg --with-tiff --with-xpm --with-x-toolkit=gtk3 --with-gpm=no
--with-xwidgets --with-modules --with-harfbuzz --with-cairo --with-json
--with-native-compilation=aot --with-tree-sitter --with-sqlite3
--with-webp --with-xinput2 build_alias=x86_64-redhat-linux-gnu
host_alias=x86_64-redhat-linux-gnu CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2
-flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
-pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer '
LDFLAGS=-Wl,-z,relro
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++
'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic
-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer ''