summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2024-10-05 09:15:46 +0800
committerSean Whitton <spwhitton@spwhitton.name>2024-10-05 09:15:46 +0800
commit069ecc9c4c3709246a6ff50d09af418444d427c3 (patch)
tree7cb6a59c7fb7207ce30ebe238410c858173d439c /lisp/emacs-lisp
parent6e8fc4f6eabe21fc3e6df8c860a99e3e5f3748fd (diff)
downloademacs-069ecc9c4c3709246a6ff50d09af418444d427c3.tar.gz
emacs-069ecc9c4c3709246a6ff50d09af418444d427c3.tar.bz2
emacs-069ecc9c4c3709246a6ff50d09af418444d427c3.zip
work-buffer--release: Bind inhibit-read-only
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind inhibit-read-only while erasing the buffer.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/subr-x.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 66347e7b584..3b4907b8f43 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -357,7 +357,8 @@ automatically killed, which means that in a such case
;; Flush BUFFER before making it available again, i.e. clear
;; its contents, remove all overlays and buffer-local
;; variables. Is it enough to safely reuse the buffer?
- (erase-buffer)
+ (let ((inhibit-read-only t))
+ (erase-buffer))
(delete-all-overlays)
(let (change-major-mode-hook)
(kill-all-local-variables t))