]> git.eshelyaron.com Git - emacs.git/commitdiff
* Make *Async-native-compile-log* buffer read-only (bug#48763)
authorAndrea Corallo <akrl@sdf.org>
Mon, 31 May 2021 18:35:43 +0000 (20:35 +0200)
committerAndrea Corallo <akrl@sdf.org>
Mon, 31 May 2021 18:52:45 +0000 (20:52 +0200)
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Make
"*Async-native-compile-log*" read-only.

lisp/emacs-lisp/comp.el

index b09739cb92e30cc428a28cb231c77957e20f4f5b..fa5a4522c334064bc3e20a2a03363fb42972ae13 100644 (file)
@@ -3941,7 +3941,11 @@ display a message."
                    (load1 load)
                    (process (make-process
                              :name (concat "Compiling: " source-file)
-                             :buffer (get-buffer-create comp-async-buffer-name)
+                             :buffer (with-current-buffer
+                                         (get-buffer-create
+                                          comp-async-buffer-name)
+                                       (setf buffer-read-only t)
+                                      (current-buffer))
                              :command (list
                                        (expand-file-name invocation-name
                                                          invocation-directory)
@@ -3970,8 +3974,9 @@ display a message."
     (run-hooks 'native-comp-async-all-done-hook)
     (with-current-buffer (get-buffer-create comp-async-buffer-name)
       (save-excursion
-        (goto-char (point-max))
-        (insert "Compilation finished.\n")))
+        (let ((buffer-read-only nil))
+          (goto-char (point-max))
+          (insert "Compilation finished.\n"))))
     ;; `comp-deferred-pending-h' should be empty at this stage.
     ;; Reset it anyway.
     (clrhash comp-deferred-pending-h)))