Variable: smie-rules-function

smie-rules-function is a variable defined in smie.el.gz.

Value

ignore

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).
  - the token to use (when ARG = empty-line-token) when we don't know how
    to indent an empty line.
- :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.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/smie.el.gz
(defvar smie-rules-function #'ignore
  "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').
  - the token to use (when ARG = `empty-line-token') when we don't know how
    to indent an empty line.
- :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.")