aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRadon Rosborough <radon.neon@gmail.com>2022-01-04 20:51:29 -0800
committerRadon Rosborough <radon.neon@gmail.com>2022-01-04 20:51:29 -0800
commit4da2898ffd41b96de27595e44620b32add3f000e (patch)
tree4f748f40292ca83512b5b8fc1420d7a60a258467
parentcbffa9298cec8f787eefd0d4bc86c943f7b5272b (diff)
Fix broken handling of filepath
-rw-r--r--apheleia.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/apheleia.el b/apheleia.el
index fbd3d77..a0d9e31 100644
--- a/apheleia.el
+++ b/apheleia.el
@@ -583,10 +583,11 @@ cmd is to be run."
output-fname
arg))
command)))
- (when (memq 'file command)
+ (when (or (memq 'file command) (memq 'filepath command))
;; Fail when using file but not as the first formatter in this
- ;; sequence.
- (when stdin-buffer
+ ;; sequence. (But filepath is okay, since it indicates content
+ ;; is not actually being read from the named file.)
+ (when (and stdin-buffer (memq 'file command))
(error "Cannot run formatter using `file' in a \
sequence unless it's first in the sequence"))
(let ((file-name (or buffer-file-name