diff options
author | Andrea Corallo <akrl@sdf.org> | 2021-05-31 20:35:43 +0200 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2021-05-31 20:52:45 +0200 |
commit | 8992a4520274600c6698406a93ff4e056897879c (patch) | |
tree | 7930f9d600264c9159402c4f822ceb7a6d052718 /lisp/emacs-lisp | |
parent | 2ee5ce208f212ed658cf2125ef6bc24a435dda50 (diff) | |
download | emacs-8992a4520274600c6698406a93ff4e056897879c.tar.gz emacs-8992a4520274600c6698406a93ff4e056897879c.tar.bz2 emacs-8992a4520274600c6698406a93ff4e056897879c.zip |
* Make *Async-native-compile-log* buffer read-only (bug#48763)
* lisp/emacs-lisp/comp.el (comp-run-async-workers): Make
"*Async-native-compile-log*" read-only.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/comp.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b09739cb92e..fa5a4522c33 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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))) |