format: emacs tcl mode indentation#146
Merged
nmoroze merged 1 commit intonmoroze:mainfrom Feb 8, 2026
Merged
Conversation
The emacs tcl mode auto-indents like this:
```
set options [list a \
b c \
d \
e]
```
Tclfmt formats this code like this instead:
```
set options [list a \
b c \
d \
e]
```
Add an option `--emacs` that uses the emacs tcl mode style instead.
The option is incomplete, which is why it's marked as experimental.
Fixes issue:
- nmoroze#139
nmoroze
reviewed
Feb 5, 2026
|
|
||
| ### Emacs Indentation | ||
|
|
||
| An experimental mode (`--emacs`) is available to make indentation style similar |
Owner
There was a problem hiding this comment.
Thoughts on --emacs-indent to make the option name more explicit? Or do you expect you might want to put other style controls under this flag?
Contributor
Author
There was a problem hiding this comment.
That name ('--emacs-indent') indeed is better for this particular functionality, but I intended to add the fix for #140 also under --emacs.
If you have a good name for that one though, I'm fine with using that one and --emacs-indent here.
Owner
There was a problem hiding this comment.
This works for me, I'm happy to have a single flag gating an experimental emacs-like style.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The emacs tcl mode auto-indents like this:
Tclfmt formats this code like this instead:
Add an option
--emacsthat uses the emacs tcl mode style instead.The option is incomplete, which is why it's marked as experimental.
Fixes issue: