Function: pascal-indent-line
pascal-indent-line is a byte-compiled function defined in
pascal.el.gz.
Signature
(pascal-indent-line)
Documentation
Indent current line as a Pascal statement.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/pascal.el.gz
(defun pascal-indent-line ()
"Indent current line as a Pascal statement."
(let* ((indent-str (pascal-calculate-indent))
(type (car indent-str))
(pascal--extra-indent (car (cdr indent-str))))
;; Labels should not be indented.
(if (and (looking-at "^[0-9a-zA-Z]+[ \t]*:[^=]")
(not (eq type 'declaration)))
(search-forward ":" nil t))
(delete-horizontal-space)
(cond (; Some things should not be indented
(or (and (eq type 'declaration) (looking-at pascal-declaration-re))
(eq type 'cpp))
())
(; Other things should have no extra indent
(looking-at pascal-noindent-re)
(indent-to pascal--extra-indent))
(; Nested functions should be indented
(looking-at pascal-defun-re)
(if (and pascal-indent-nested-functions
(eq type 'defun))
(indent-to (+ pascal--extra-indent pascal-indent-level))
(indent-to pascal--extra-indent)))
(; But most lines are treated this way
(indent-to (eval (cdr (assoc type pascal-indent-alist))))
))))