diff --git a/CHANGELOG.md b/CHANGELOG.md index d07eea6..b2f7ec4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,9 @@ The format is based on [Keep a Changelog]. ([#64], [#65]). Previously, when saving a number of files at the same time, the contents of those buffers could be corrupted by a race condition. +* In some circumstances the error `wrong-type-argument bufferp nil` + could be reported when running certain formatters under Apheleia. + This has been fixed. [#24]: https://github.com/raxod502/apheleia/pull/24 [#30]: https://github.com/raxod502/apheleia/issues/30 @@ -57,6 +60,7 @@ The format is based on [Keep a Changelog]. [#52]: https://github.com/raxod502/apheleia/issues/52 [#54]: https://github.com/raxod502/apheleia/pull/54 [#55]: https://github.com/raxod502/apheleia/issues/55 +[#60]: https://github.com/raxod502/apheleia/issues/60 [#62]: https://github.com/raxod502/apheleia/issues/62 [#64]: https://github.com/raxod502/apheleia/issues/64 [#65]: https://github.com/raxod502/apheleia/pull/65 diff --git a/apheleia.el b/apheleia.el index 6d46208..3d170d0 100644 --- a/apheleia.el +++ b/apheleia.el @@ -329,11 +329,11 @@ command succeeds provided that its exit status is 0." (kill-buffer stdout) (kill-buffer stderr))))))) (set-process-sentinel (get-buffer-process stderr) #'ignore) - (set-process-coding-system - apheleia--current-process - nil - (buffer-local-value 'buffer-file-coding-system stdin)) (when stdin + (set-process-coding-system + apheleia--current-process + nil + (buffer-local-value 'buffer-file-coding-system stdin)) (process-send-string apheleia--current-process (with-current-buffer stdin