]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't save unrelated buffers before recompiling directory (Bug#25964)
authorAndreas Politz <politza@hochschule-trier.de>
Sat, 4 Mar 2017 04:58:34 +0000 (05:58 +0100)
committerNoam Postavsky <npostavs@gmail.com>
Sat, 20 May 2017 22:28:23 +0000 (18:28 -0400)
* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Only save
buffers visiting lisp files under the directory being compiled.

lisp/emacs-lisp/bytecomp.el

index e716eef10ade91262f73b13de1fd6f9bf4d19670..6c12e5d8e25221f8b2c6a283c6934d5f80726825 100644 (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))