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

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

[elpa] externals/beardbolt f491a6adb2 278/323: Rework to use write-regio


From: ELPA Syncer
Subject: [elpa] externals/beardbolt f491a6adb2 278/323: Rework to use write-region, use a little less memory
Date: Thu, 9 Mar 2023 10:58:38 -0500 (EST)

branch: externals/beardbolt
commit f491a6adb28f2bf9cc8a9e7dd373e0c08b9e0568
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Rework to use write-region, use a little less memory
    
    * beardbolt.el (bb-compile): Rework.
---
 beardbolt.el | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/beardbolt.el b/beardbolt.el
index c41837d03f..513329e746 100644
--- a/beardbolt.el
+++ b/beardbolt.el
@@ -666,11 +666,8 @@ Interactively, determine LANG from `major-mode'."
                (when risky-vars
                  (message "[beardbolt] Some variables risky %s" risky-vars)))))
     (hack-local-variables))
-  (let* ((dump-file
-          (let ((inhibit-message t))
-            (make-temp-file "beardbolt-dump-" nil
-                            (concat "." (file-name-extension buffer-file-name))
-                            (buffer-string))))
+  (let* ((dump-file (make-temp-file "beardbolt-dump-" nil
+                                    (concat "." (file-name-extension 
buffer-file-name))))
          (src-buffer (current-buffer))
          (specs (funcall (bb--lang-compile-specs lang)))
          (spec (alist-get
@@ -678,6 +675,8 @@ Interactively, determine LANG from `major-mode'."
                 specs))
          (command-and-declared-output (funcall (car spec) dump-file))
          (cmd (car command-and-declared-output)))
+    (let ((inhibit-message t))
+      (write-region (point-min) (point-max) dump-file))
     (with-current-buffer ; With compilation buffer
         (let ((shell-file-name (or (executable-find bb--shell)
                                    shell-file-name))



reply via email to

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