smie-rules-function

smie-rules-function is a variable defined in `smie.el'.
Its value is
ignore

  • This variable may be risky if used as a file-local variable.

Documentation:
Function providing the indentation rules.
It takes two arguments METHOD and ARG where the meaning of ARG
and the expected return value depends on METHOD.
METHOD can be:
- :after, in which case ARG is a token and the function should return the
OFFSET to use for indentation after ARG.
- :before, in which case ARG is a token and the function should return the
OFFSET to use to indent ARG itself.
- :elem, in which case the function should return either:
- the offset to use to indent function arguments (ARG = `arg')
- the basic indentation step (ARG = `basic').
- :list-intro, in which case ARG is a token and the function should return
non-nil if TOKEN is followed by a list of expressions (not separated by any
token) rather than an expression.
- :close-all, in which case ARG is a close-paren token at indentation and
the function should return non-nil if it should be aligned with the opener
of the last close-paren token on the same line, if there are multiple.
Otherwise, it will be aligned with its own opener.

When ARG is a token, the function is called with point just before that token.
A return value of nil always means to fallback on the default behavior, so the
function should return nil for arguments it does not expect.

OFFSET can be:
nil use the default indentation rule.
(column . COLUMN) indent to column COLUMN.
NUMBER offset by NUMBER, relative to a base token
which is the current token for :after and
its parent for :before.

The functions whose name starts with "smie-rule-" are helper functions
designed specifically for use in this function.