If you are using a mode whose indentation is provided by SMIE, you can
customize the indentation to suit your preferences. You can do this
on a per-mode basis (using the option
smie-config), or a
per-file basis (using the function
smie-config-local in a
file-local variable specification).
This option lets you customize indentation on a per-mode basis.
It is an alist with elements of the form
(mode . rules).
For the precise form of rules, see the variable’s documentation; but
you may find it easier to use the command
This command tries to work out appropriate settings to produce your preferred style of indentation. Simply call the command while visiting a file that is indented with your style.
Call this command after using
smie-config-guess, to save your
settings for future sessions.
This command displays the rules that are used to indent the current line.
This command adds a local rule to adjust the indentation of the current line.
This function adds rules as indentation rules for the current buffer.
These add to any mode-specific rules defined by the
To specify custom indentation rules for a specific file, add an entry
to the file’s local variables of the form:
eval: (smie-config-local '(rules)).