branch: scratch/dired-git-info
commit aa8248a1eb66354f345229313258af9014b7b92a
Author: Clemens Radermacher <[email protected]>
Commit: Clemens Radermacher <[email protected]>

    Use temp buffer
---
 dired-git-info.el | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/dired-git-info.el b/dired-git-info.el
index 711b78e..3a8ff39 100644
--- a/dired-git-info.el
+++ b/dired-git-info.el
@@ -164,18 +164,16 @@ info format and defaults to `dgi-commit-message-format'."
           (dolist (file files (nreverse messages))
             (push (dgi--get-commit-info file)
                   messages)))
-    (with-current-buffer (get-buffer-create " *dired-git-info*")
-      (let ((inhibit-read-only nil))
-        (erase-buffer)
-        (dolist (message messages)
-          (insert (or message "") "\n"))
-        (align-regexp (point-min)
-                      (point-max)
-                      "\\(\\s-*\\)\t" nil nil t)
-        (goto-char (point-min))
-        (while (search-forward "\t" nil t)
-          (replace-match " "))
-        (split-string (buffer-string) "\n")))))
+    (with-temp-buffer
+      (dolist (message messages)
+        (insert (or message "") "\n"))
+      (align-regexp (point-min)
+                    (point-max)
+                    "\\(\\s-*\\)\t" nil nil t)
+      (goto-char (point-min))
+      (while (search-forward "\t" nil t)
+        (replace-match " "))
+      (split-string (buffer-string) "\n"))))
 
 
 ;;;###autoload

Reply via email to