Function: lisp-indent-lambda-list
lisp-indent-lambda-list is a byte-compiled function defined in
cl-indent.el.gz.
Signature
(lisp-indent-lambda-list INDENT-POINT SEXP-COLUMN CONTAINING-FORM-START)
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/cl-indent.el.gz
(defun lisp-indent-lambda-list
(indent-point sexp-column containing-form-start)
(let (limit)
(cond ((save-excursion
(goto-char indent-point)
(beginning-of-line)
(skip-chars-forward " \t")
(setq limit (point))
(looking-at lisp-indent-lambda-list-keywords-regexp))
;; We're facing a lambda-list keyword.
(if lisp-lambda-list-keyword-alignment
;; Align to the first keyword if any, or to the beginning of
;; the lambda-list.
(save-excursion
(goto-char containing-form-start)
(save-match-data
(if (re-search-forward
lisp-indent-lambda-list-keywords-regexp
limit t)
(progn
(goto-char (match-beginning 0))
(current-column))
(1+ sexp-column))))
;; Align to the beginning of the lambda-list.
(1+ sexp-column)))
(t
;; Otherwise, align to the first argument of the last lambda-list
;; keyword, the keyword itself, or the beginning of the
;; lambda-list.
(save-excursion
(goto-char indent-point)
(forward-line -1)
(end-of-line)
(save-match-data
(if (re-search-backward lisp-indent-lambda-list-keywords-regexp
containing-form-start t)
(let* ((keyword-posn
(progn
(goto-char (match-beginning 0))
(current-column)))
(indented-keyword-posn
(+ keyword-posn
lisp-lambda-list-keyword-parameter-indentation)))
(goto-char (match-end 0))
(skip-chars-forward " \t")
(if (eolp)
indented-keyword-posn
(if lisp-lambda-list-keyword-parameter-alignment
(current-column)
indented-keyword-posn)))
(1+ sexp-column))))))))