From 40492581f96626e405e4b453456b8c9b83822c97 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 6 Jul 2023 11:50:41 +0300 Subject: [PATCH] Use 'emacs-lisp-compilation-mode' in native compilation buffers * lisp/emacs-lisp/comp.el (comp-log-to-buffer) (comp-run-async-workers): Use 'emacs-lisp-compilation-mode' in the buffers where we log the results of native compilation. Suggested by No Wayman . (Bug#64452) --- lisp/emacs-lisp/comp.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index 22fb08e4688..77584b692a4 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -1133,7 +1133,8 @@ with `message'. Otherwise, log with `comp-log-to-buffer'." (log-buffer (or (get-buffer comp-log-buffer-name) (with-current-buffer (get-buffer-create comp-log-buffer-name) - (setf buffer-read-only t) + (unless (derived-mode-p 'compilation-mode) + (emacs-lisp-compilation-mode)) (current-buffer)))) (log-window (get-buffer-window log-buffer)) (inhibit-read-only t) @@ -4085,7 +4086,8 @@ display a message." :buffer (with-current-buffer (get-buffer-create comp-async-buffer-name) - (setf buffer-read-only t) + (unless (derived-mode-p 'compilation-mode) + (emacs-lisp-compilation-mode)) (current-buffer)) :command (list (expand-file-name invocation-name @@ -4119,6 +4121,8 @@ display a message." (run-hooks 'native-comp-async-all-done-hook) (with-current-buffer (get-buffer-create comp-async-buffer-name) (save-excursion + (unless (derived-mode-p 'compilation-mode) + (emacs-lisp-compilation-mode)) (let ((inhibit-read-only t)) (goto-char (point-max)) (insert "Compilation finished.\n")))) -- 2.39.2