]> git.eshelyaron.com Git - emacs.git/commitdiff
Use 'emacs-lisp-compilation-mode' in native compilation buffers
authorEli Zaretskii <eliz@gnu.org>
Thu, 6 Jul 2023 08:50:41 +0000 (11:50 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 6 Jul 2023 08:50:41 +0000 (11:50 +0300)
* 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 <iarchivedmywholelife@gmail.com>.  (Bug#64452)

lisp/emacs-lisp/comp.el

index 22fb08e4688e4e94a3c0be8f3b974907fe814eb4..77584b692a4d94b9cc1b599d0a21b06a1f9395b4 100644 (file)
@@ -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"))))