@@ -60,8 +60,11 @@ all packages are always compiled asynchronously."
60
60
(defvar async-bytecomp-load-variable-regexp " \\ `load-path\\' "
61
61
" The variable used by `async-inject-variables' when (re)compiling async." )
62
62
63
- (defun async-bytecomp--file-to-comp-buffer (file-or-dir &optional quiet )
64
- (let ((bn (file-name-nondirectory file-or-dir)))
63
+ (defun async-bytecomp--file-to-comp-buffer (file-or-dir &optional quiet type )
64
+ (let ((bn (file-name-nondirectory file-or-dir))
65
+ (action-name (pcase type
66
+ ('file " File" )
67
+ ('directory " Directory" ))))
65
68
(if (file-exists-p async-byte-compile-log-file)
66
69
(let ((buf (get-buffer-create byte-compile-log-buffer))
67
70
(n 0 ))
@@ -79,10 +82,10 @@ all packages are always compiled asynchronously."
79
82
(cl-incf n)))
80
83
(if (> n 0 )
81
84
(message " Failed to compile %d files in directory `%s' " n bn)
82
- (message " Directory `%s' compiled asynchronously with warnings"
83
- bn)))))
85
+ (message " %s `%s' compiled asynchronously with warnings"
86
+ action-name bn)))))
84
87
(unless quiet
85
- (message " Directory `%s' compiled asynchronously with success" bn)))))
88
+ (message " %s `%s' compiled asynchronously with success" action-name bn)))))
86
89
87
90
;;;### autoload
88
91
(defun async-byte-recompile-directory (directory &optional quiet )
@@ -97,7 +100,7 @@ All *.elc files are systematically deleted before proceeding."
97
100
(load " async" )
98
101
(let ((call-back
99
102
(lambda (&optional _ignore )
100
- (async-bytecomp--file-to-comp-buffer directory quiet))))
103
+ (async-bytecomp--file-to-comp-buffer directory quiet 'directory ))))
101
104
(async-start
102
105
`(lambda ()
103
106
(require 'bytecomp )
@@ -175,7 +178,7 @@ Same as `byte-compile-file' but asynchronous."
175
178
(interactive " fFile: " )
176
179
(let ((call-back
177
180
(lambda (&optional _ignore )
178
- (async-bytecomp--file-to-comp-buffer file))))
181
+ (async-bytecomp--file-to-comp-buffer file nil 'file ))))
179
182
(async-start
180
183
`(lambda ()
181
184
(require 'bytecomp )
0 commit comments