comparison lisp/emacs-lisp/lisp-mode.el @ 41509:aeb0c4a140d2

(lisp-indent-function): Add doc string.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Nov 2001 19:32:53 +0000
parents cc4a4bcf9fb6
children 4f4835967793
comparison
equal deleted inserted replaced
41508:b04f0b4fdbd6 41509:aeb0c4a140d2
789 normal-indent)) 789 normal-indent))
790 (t 790 (t
791 normal-indent)))))) 791 normal-indent))))))
792 792
793 (defun lisp-indent-function (indent-point state) 793 (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."
794 (let ((normal-indent (current-column))) 814 (let ((normal-indent (current-column)))
795 (goto-char (1+ (elt state 1))) 815 (goto-char (1+ (elt state 1)))
796 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t) 816 (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
797 (if (and (elt state 2) 817 (if (and (elt state 2)
798 (not (looking-at "\\sw\\|\\s_"))) 818 (not (looking-at "\\sw\\|\\s_")))