(byte-compile-log-file): Check major-mode via derived-mode-p.

This commit is contained in:
Stefan Monnier 2007-09-07 15:04:09 +00:00
parent b0a96f7b20
commit 5c7ffa0488
2 changed files with 8 additions and 4 deletions

View file

@ -1037,8 +1037,7 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(setq byte-compile-last-logged-file byte-compile-current-file
byte-compile-last-warned-form nil)
;; Do this after setting default-directory.
(unless (eq major-mode 'compilation-mode)
(compilation-mode))
(unless (derived-mode-p 'compilation-mode) (compilation-mode))
(compilation-forget-errors)
pt))))