Don't save unrelated buffers before recompiling directory (Bug#25964)

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Only save
buffers visiting lisp files under the directory being compiled.
This commit is contained in:
Andreas Politz 2017-03-04 05:58:34 +01:00 committed by Noam Postavsky
parent 848c90e3d4
commit f151eb0141

View file

@ -1659,7 +1659,12 @@ that already has a `.elc' file."
(if arg (setq arg (prefix-numeric-value arg)))
(if noninteractive
nil
(save-some-buffers)
(save-some-buffers
nil (lambda ()
(let ((file (buffer-file-name)))
(and file
(string-match-p emacs-lisp-file-regexp file)
(file-in-directory-p file directory)))))
(force-mode-line-update))
(with-current-buffer (get-buffer-create byte-compile-log-buffer)
(setq default-directory (expand-file-name directory))