Function: current-indentation

current-indentation is a function defined in indent.c.

Signature

(current-indentation)

Documentation

Return the indentation of the current line.

This is the horizontal position of the character following any initial whitespace. Text that has an invisible property is considered as having width 0, unless buffer-invisibility-spec specifies that it is replaced by an ellipsis.

View in manual

Aliases

org-get-indentation (obsolete since 9.2)

Source Code

// Defined in /usr/src/emacs/src/indent.c
{
  ptrdiff_t posbyte;

  find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &posbyte, 1);
  return make_fixnum (position_indentation (posbyte));
}