[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 f7dc0202127: Fix "Text is read-only" on backspacing initial Cal
From: |
Eli Zaretskii |
Subject: |
emacs-29 f7dc0202127: Fix "Text is read-only" on backspacing initial Calc input |
Date: |
Thu, 23 Nov 2023 10:42:12 -0500 (EST) |
branch: emacs-29
commit f7dc0202127a73f83de52b1999a7fe05dd64fff6
Author: George Kuzler <gkuzler@gmail.com>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix "Text is read-only" on backspacing initial Calc input
Immediately after `calc-mode' opens the minibuffer for input
(because you typed a digit, "e", etc), pressing backspace
should clear the minibuffer and return you to the *Calculator*
buffer. Instead, it leaves the minibuffer as-is and prints the
message "Text is read-only"; this is because the function used,
`erase-buffer', tries to erase the read-only minibuffer prompt.
Using `delete-minibuffer-contents' fixes this, since it doesn't
attempt to delete the prompt.
* lisp/calc/calc.el (calcDigit-backspace): Use
`delete-minibuffer-contents' instead of `erase-buffer'. (Bug#67395)
Copyright-paperwork-exempt: yes
---
lisp/calc/calc.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index f129552c9a4..06ccb0f0cfa 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2477,7 +2477,7 @@ the United States."
(defun calcDigit-backspace ()
(interactive)
(cond ((eq last-command 'calcDigit-start)
- (erase-buffer))
+ (delete-minibuffer-contents))
(t (backward-delete-char 1)))
(if (= (calc-minibuffer-size) 0)
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 f7dc0202127: Fix "Text is read-only" on backspacing initial Calc input,
Eli Zaretskii <=