From: Andreas Politz Date: Sat, 4 Mar 2017 04:58:34 +0000 (+0100) Subject: Don't save unrelated buffers before recompiling directory (Bug#25964) X-Git-Tag: emacs-26.0.90~521^2~341 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f151eb01418b80d102c767566e93ac332a8bf7c3;p=emacs.git 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. --- diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e716eef10ad..6c12e5d8e25 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -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))