From 421220e2946dadab77fbfc79cf4f0daa49961c41 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 16 Jun 2019 17:36:52 -0700 Subject: [PATCH] Tweak compilation mode used by byte-recompile-directory * lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-mode): Doc fix. (byte-recompile-directory): Use emacs-lisp-compilation-mode. --- lisp/emacs-lisp/bytecomp.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index b917b713c06..66dfe4302f4 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1050,7 +1050,7 @@ The value nil as an element means to try the default directory." (string :tag "Directory")))) (define-compilation-mode emacs-lisp-compilation-mode "elisp-compile" - "The variant of `compilation-mode' used for emacs-lisp error buffers") + "The variant of `compilation-mode' used for emacs-lisp compilation buffers.") (defvar byte-compile-current-form nil) (defvar byte-compile-dest-file nil) @@ -1749,8 +1749,8 @@ that already has a `.elc' file." (with-current-buffer (get-buffer-create byte-compile-log-buffer) (setq default-directory (expand-file-name directory)) ;; compilation-mode copies value of default-directory. - (unless (eq major-mode 'compilation-mode) - (compilation-mode)) + (unless (derived-mode-p 'compilation-mode) + (emacs-lisp-compilation-mode)) (let ((directories (list default-directory)) (default-directory default-directory) (skip-count 0) -- 2.39.2