aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Foley <github@kevinjfoley.me>2020-02-09 16:05:32 -0500
committerGitHub <noreply@github.com>2020-02-09 13:05:32 -0800
commit76f0d946e7c860dbd1382828c2858b36bd06d507 (patch)
tree1fd928698446b81be938262c673ca05ae87de06b
parent179219e619ebaa095760e2a92ef57bb3a28869bc (diff)
Write new-buffer to new-fname (#9)
* apheleia.el: (apheleia--create-rcs-patch): Write to new-fname from new-buffer instead of writing from a temp buffer
-rw-r--r--apheleia.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/apheleia.el b/apheleia.el
index 220ce0c..968b8f9 100644
--- a/apheleia.el
+++ b/apheleia.el
@@ -357,9 +357,9 @@ as its sole argument."
(with-current-buffer new-buffer
(and (not (buffer-modified-p)) buffer-file-name))))
(unless (or old-fname new-fname)
- (with-temp-buffer
- (apheleia--write-file-silently (make-temp-file "apheleia"))
- (setq new-fname buffer-file-name)))
+ (with-current-buffer new-buffer
+ (setq new-fname (make-temp-file "apheleia"))
+ (apheleia--write-file-silently new-fname)))
(with-current-buffer (get-buffer-create " *apheleia-patch*")
(erase-buffer)
(apheleia--make-process