Subject: Re: bug#25340: Save-some-buffers gets called when installing packages.

From: Nikolay Kudryavtsev <[email-masked]>
Date: Thu, 5 Jan 2017 09:26:31 +0300

Oh, that's a better idea. Fixed the patch.

The question now is whether there's even a need to add a new arg to 
byte-recompile-directory?

-- 
Best Regards,
Nikolay Kudryavtsev

From ed64fe20726df039ad0a9bede2d1f4167ea607f9 Mon Sep 17 00:00:00 2001
From: Nikolay Kudryavtsev <[email-masked]>
Date: Thu, 5 Jan 2017 09:10:01 +0300
Subject: [PATCH] Prevent package-install from asking to save buffers

* lisp/emacs-lisp/bytecomp.el (byte-recompile-directory):
`save-some-buffers' is called only for files within that directory.
---
 lisp/emacs-lisp/bytecomp.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 63be7e2..db84973 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1639,7 +1639,10 @@ byte-recompile-directory
   (if arg (setq arg (prefix-numeric-value arg)))
   (if noninteractive
       nil
-    (save-some-buffers)
+    (save-some-buffers nil
+                       (lambda ()
+                         (member (expand-file-name buffer-file-name)
+                                 (directory-files directory t))))
     (force-mode-line-update))
   (with-current-buffer (get-buffer-create byte-compile-log-buffer)
     (setq default-directory (expand-file-name directory))
-- 
2.10.2.windows.1