diff --git a/CHANGELOG.md b/CHANGELOG.md index cdbf81b..0c02196 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,10 @@ The format is based on [Keep a Changelog]. * Stylua is used now in `lua-ts-mode` as well as just `lua-mode`, by default ([#275]). +### Bugs fixed +* Apheleia sometimes failed to determine indent level from Emacs + settings even when configured to do so. This is fixed ([#274]). + [#209]: https://github.com/radian-software/apheleia/pull/209 [#229]: https://github.com/radian-software/apheleia/pull/229 [#257]: https://github.com/radian-software/apheleia/pull/257 @@ -44,6 +48,7 @@ The format is based on [Keep a Changelog]. [#264]: https://github.com/radian-software/apheleia/pull/264 [#267]: https://github.com/radian-software/apheleia/pull/267 [#271]: https://github.com/radian-software/apheleia/pull/271 +[#274]: https://github.com/radian-software/apheleia/issues/274 [#275]: https://github.com/radian-software/apheleia/pull/275 ## 4.0 (released 2023-11-23) diff --git a/apheleia-utils.el b/apheleia-utils.el index 7e3820f..70cf564 100644 --- a/apheleia-utils.el +++ b/apheleia-utils.el @@ -31,7 +31,7 @@ always returns nil to defer to the formatter." (cond ((not apheleia-formatters-respect-indent-level) nil) (indent-tabs-mode tab-flag) - (indent-var + (t (unless indent-var (setq indent-var (cl-case major-mode