Skip to content

Commit

Permalink
[#52] Fix handling of non-file buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
raxod502 committed Jan 5, 2022
1 parent 4da2898 commit c073299
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apheleia.el
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,14 @@ sequence unless it's first in the sequence"))
(setq stdin nil))
(if (memq arg '(file filepath))
(prog1 file-name
(when (buffer-modified-p)
;; If `buffer-file-name' is
;; nil then there is no
;; backing file, so
;; `buffer-modified-p' should
;; be ignored (it always
;; returns non-nil).
(when (and (buffer-modified-p)
buffer-file-name)
(cl-return)))
arg))
command))))
Expand Down

0 comments on commit c073299

Please sign in to comment.