Function: haskell-indentation-indent-line
haskell-indentation-indent-line is an interactive and natively
compiled function defined in haskell-indentation.el.
Signature
(haskell-indentation-indent-line)
Documentation
Indent current line, cycle though indentation positions.
Do nothing inside multiline comments and multiline strings. Start enumerating the indentation points to the right. The user can continue by repeatedly pressing TAB. When there is no more indentation points to the right, we switch going to the left.
Key Bindings
This command is not in any keymaps.
Source Code
;; Defined in /nix/store/9lz2mhw95f9fqxr9mnq46k3f6qz3aq83-emacs-packages-deps/share/emacs/site-lisp/elpa/haskell-mode-20260904.1042/haskell-indentation.el
"") ; FIXME
(defun haskell-indentation-indent-line ()
"Indent current line, cycle though indentation positions.
Do nothing inside multiline comments and multiline strings.
Start enumerating the indentation points to the right. The user
can continue by repeatedly pressing TAB. When there is no more
indentation points to the right, we switch going to the left."
(interactive "*")
;; try to repeat
(when (not (haskell-indentation-indent-line-repeat))
(setq haskell-indentation-dyn-last-direction nil)
;; parse error is intentionally not caught here, it may come from
;; `haskell-indentation-find-indentations', but escapes the scope
;; and aborts the operation before any moving happens
(let* ((cc (current-column))
(ci (haskell-indentation-current-indentation))
(inds (save-excursion
(move-to-column ci)
(or (haskell-indentation-find-indentations)
'(0))))
(valid (memq ci inds))
(cursor-in-whitespace (< cc ci)))
(if (and valid cursor-in-whitespace)
(move-to-column ci)
(haskell-indentation-reindent-to
(haskell-indentation-next-indentation ci inds 'nofail)
cursor-in-whitespace))
(setq haskell-indentation-dyn-last-direction 'right
haskell-indentation-dyn-last-indentations inds))))