791 |
normal-indent)))))) |
normal-indent)))))) |
792 |
|
|
793 |
(defun lisp-indent-function (indent-point state) |
(defun lisp-indent-function (indent-point state) |
794 |
|
"This function is the normal value of the variable `lisp-indent-function'. |
795 |
|
It is used when indenting a line within a function call, to see if the |
796 |
|
called function says anything special about how to indent the line. |
797 |
|
|
798 |
|
INDENT-POINT is the position where the user typed TAB, or equivalent. |
799 |
|
Point is located at the point to indent under (for default indentation); |
800 |
|
STATE is the `parse-partial-sexp' state for that position. |
801 |
|
|
802 |
|
If the current line is in a call to a Lisp function |
803 |
|
which has a non-nil property `lisp-indent-function', |
804 |
|
that specifies how to do the indentation. The property value can be |
805 |
|
* `defun', meaning indent `defun'-style; |
806 |
|
* an integer N, meaning indent the first N arguments specially |
807 |
|
like ordinary function arguments and then indent any further |
808 |
|
aruments like a body; |
809 |
|
* a function to call just as this function was called. |
810 |
|
If that function returns nil, that means it doesn't specify |
811 |
|
the indentation. |
812 |
|
|
813 |
|
This function also returns nil meaning don't specify the indentation." |
814 |
(let ((normal-indent (current-column))) |
(let ((normal-indent (current-column))) |
815 |
(goto-char (1+ (elt state 1))) |
(goto-char (1+ (elt state 1))) |
816 |
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) |
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) |