Skip to content

Fix setopt-local and turning alignment on in open buffers - #173

Merged
bbatsov merged 3 commits into
mainfrom
setopt-local-follow-up
Nov 7, 2026
Merged

bbatsov merged 3 commits into
mainfrom
setopt-local-follow-up

Conversation

@bbatsov

@bbatsov bbatsov commented Nov 7, 2026

Copy link
Copy Markdown
Member

Follow-up to #164. setopt-local of clojure-ts-indent-style or of a font-lock option set the variable without reconfiguring the buffer, and turning clojure-ts-align-forms-automatically on in an open buffer no longer aligned, since indent-region-function was only set when the option was on as the mode started.

Since #164 indent-region-function was only set when
clojure-ts-align-forms-automatically was on as the mode started, so
turning it on later in an open buffer, with setopt or setq-local, left
indent-region unaligned.  clojure-ts-indent-region checks the option
when it runs, which is also what makes a directory-local value work, so
it can be set unconditionally again.
#164 made the setters take the buffer-local argument setopt-local
passes, but then they only set the variable: a buffer kept the
indentation rules of its old style, and its old faces until something
refontified it.  A directory-local value worked anyway, because
clojure-ts--apply-local-variables runs after it's set.
#172 removed clojure-ts--markdown-inline-sexp-nodes along with its only
use, and #164 brought it back while rebasing.
@bbatsov
bbatsov merged commit 8298425 into main Nov 7, 2026
10 checks passed
@bbatsov
bbatsov deleted the setopt-local-follow-up branch November 7, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant