emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 069ecc9c4c3: work-buffer--release: Bind inhibit-read-only


From: Sean Whitton
Subject: master 069ecc9c4c3: work-buffer--release: Bind inhibit-read-only
Date: Fri, 4 Oct 2024 21:15:53 -0400 (EDT)

branch: master
commit 069ecc9c4c3709246a6ff50d09af418444d427c3
Author: Sean Whitton <spwhitton@spwhitton.name>
Commit: Sean Whitton <spwhitton@spwhitton.name>

    work-buffer--release: Bind inhibit-read-only
    
    * lisp/emacs-lisp/subr-x.el (work-buffer--release): Bind
    inhibit-read-only while erasing the buffer.
---
 lisp/emacs-lisp/subr-x.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]