- Replace `with-temp-buffer' + `write-file' with `with-temp-file':
  Much more efficient.  Just look at all the crap `write-file'
  wastes time on, while `write-region' (as used by `with-temp-file')
  is a C built-in.

- Replace `dolist' with `mapconcat':
  Once again, much more efficient.  Why use a CL macro when using
  a C built-in is just as concise and readable?

Signed-off-by: Pieter Praet <[email protected]>
---
 magit.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/magit.el b/magit.el
index 1985988..bf72773 100644
--- a/magit.el
+++ b/magit.el
@@ -6168,10 +6168,8 @@ (defun magit-wazzup-toggle-ignore (branch edit)
                (setq ignored (delete branch ignored))))
             (t
              (setq ignored (append ignored (list branch)))))
-      (with-temp-buffer
-        (dolist (l ignored)
-          (insert l "\n"))
-        (write-file ignore-file))
+      (with-temp-file ignore-file
+        (insert (mapconcat 'identity ignored "\n")))
       (magit-need-refresh))))
 
 (defun magit-refresh-wazzup-buffer (head all)
-- 
1.7.11.1

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to