]> git.eshelyaron.com Git - emacs.git/commitdiff
work-buffer--release: Bind inhibit-read-only
authorSean Whitton <spwhitton@spwhitton.name>
Sat, 5 Oct 2024 01:15:46 +0000 (09:15 +0800)
committerEshel Yaron <me@eshelyaron.com>
Sun, 6 Oct 2024 06:49:26 +0000 (08:49 +0200)
* lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind
inhibit-read-only while erasing the buffer.

(cherry picked from commit 069ecc9c4c3709246a6ff50d09af418444d427c3)

lisp/emacs-lisp/subr-x.el

index 4cdb065feeb21f14295aad8187d7132ed5c91b1b..5b47deb880e2cd14e82471201ef9d2de74bccba3 100644 (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))