emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 914a284 124/187: * async-bytecomp.el: Fix callback.


From: Michael Albinus
Subject: [elpa] master 914a284 124/187: * async-bytecomp.el: Fix callback.
Date: Wed, 30 Dec 2015 11:50:07 +0000

branch: master
commit 914a284df316bee79794b7a1c11c6a8c03d2da79
Author: Thierry Volpiatto <address@hidden>
Commit: Thierry Volpiatto <address@hidden>

    * async-bytecomp.el: Fix callback.
    Now we use display-buffer, the buffer is not current, so use
    with-current-buffer.
---
 async-bytecomp.el |   28 ++++++++++++++--------------
 1 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/async-bytecomp.el b/async-bytecomp.el
index 5279cb7..3c25df8 100644
--- a/async-bytecomp.el
+++ b/async-bytecomp.el
@@ -55,23 +55,23 @@
   (let ((call-back
          `(lambda (&optional ignore)
             (if (file-exists-p async-byte-compile-log-file)
-                (progn
-                  (display-buffer (get-buffer-create
-                                   byte-compile-log-buffer))
-                  (goto-char (point-max))
-                  (let ((inhibit-read-only t))
-                    (insert-file-contents async-byte-compile-log-file)
-                    (compilation-mode))
-                  (delete-file async-byte-compile-log-file)
-                  (let ((n 0))
+                (let ((buf (get-buffer-create byte-compile-log-buffer))
+                      (n 0))
+                  (with-current-buffer buf
+                    (goto-char (point-max))
+                    (let ((inhibit-read-only t))
+                      (insert-file-contents async-byte-compile-log-file)
+                      (compilation-mode))
+                    (display-buffer buf)
+                    (delete-file async-byte-compile-log-file)
                     (save-excursion
                       (goto-char (point-min))
                       (while (re-search-forward "^.*:Error:" nil t)
-                        (incf n)))
-                    (if (> n 0)
-                        (message "Failed to compile %d files in directory 
`%s'" n ,directory)
-                        (message "Directory `%s' compiled asynchronously with 
warnings" ,directory))))
-                  (message "Directory `%s' compiled asynchronously with 
success" ,directory)))))
+                        (incf n))))
+                  (if (> n 0)
+                      (message "Failed to compile %d files in directory `%s'" 
n ,directory)
+                    (message "Directory `%s' compiled asynchronously with 
warnings" ,directory)))
+              (message "Directory `%s' compiled asynchronously with success" 
,directory)))))
     (async-start
      `(lambda ()
         (require 'bytecomp)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]