mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-13 09:32:47 +00:00
* Add a warning for missing write privilege
* lisp/emacs-lisp/comp.el (native-compile-async): Check for write privilege and raise a warning in case.
This commit is contained in:
parent
8d37220190
commit
1ec7499e59
@ -2344,7 +2344,16 @@ queued with LOAD %"
|
||||
file load (cdr entry))
|
||||
;; Make sure we are not already compiling `file' (bug#40838).
|
||||
(unless (gethash file comp-async-compilations)
|
||||
(setf comp-files-queue (append comp-files-queue `((,file . ,load)))))))
|
||||
(let ((out-dir (comp-output-directory file))
|
||||
(out-filename (comp-output-filename file)))
|
||||
(if (or (file-writable-p out-filename)
|
||||
(and (not (file-exists-p out-dir))
|
||||
(file-writable-p (substring out-dir 0 -1))))
|
||||
(setf comp-files-queue
|
||||
(append comp-files-queue `((,file . ,load))))
|
||||
(display-warning 'comp
|
||||
(format "No write access for %s skipping."
|
||||
out-filename)))))))
|
||||
(when (zerop (comp-async-runnings))
|
||||
(comp-run-async-workers)
|
||||
(message "Compilation started."))))
|
||||
|
Loading…
Reference in New Issue
Block a user