1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-03 02:31:03 -08:00

work-buffer--release: Bind inhibit-read-only

* lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind
inhibit-read-only while erasing the buffer.
This commit is contained in:
Sean Whitton 2024-10-05 09:15:46 +08:00
parent 6e8fc4f6ea
commit 069ecc9c4c

View file

@ -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))