mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
(lisp-indent-function): Add doc string.
This commit is contained in:
parent
ab7207af6f
commit
9fefa08b84
2 changed files with 22 additions and 0 deletions
|
|
@ -1,5 +1,7 @@
|
||||||
2001-11-25 Richard M. Stallman <rms@gnu.org>
|
2001-11-25 Richard M. Stallman <rms@gnu.org>
|
||||||
|
|
||||||
|
* emacs-lisp/lisp-mode.el (lisp-indent-function): Add doc string.
|
||||||
|
|
||||||
* international/quail.el (quail-keyboard-layout-button):
|
* international/quail.el (quail-keyboard-layout-button):
|
||||||
Define button type.
|
Define button type.
|
||||||
(quail-keyboard-customize-button): Likewise.
|
(quail-keyboard-customize-button): Likewise.
|
||||||
|
|
|
||||||
|
|
@ -791,6 +791,26 @@ is the buffer position of the start of the containing expression."
|
||||||
normal-indent))))))
|
normal-indent))))))
|
||||||
|
|
||||||
(defun lisp-indent-function (indent-point state)
|
(defun lisp-indent-function (indent-point state)
|
||||||
|
"This function is the normal value of the variable `lisp-indent-function'.
|
||||||
|
It is used when indenting a line within a function call, to see if the
|
||||||
|
called function says anything special about how to indent the line.
|
||||||
|
|
||||||
|
INDENT-POINT is the position where the user typed TAB, or equivalent.
|
||||||
|
Point is located at the point to indent under (for default indentation);
|
||||||
|
STATE is the `parse-partial-sexp' state for that position.
|
||||||
|
|
||||||
|
If the current line is in a call to a Lisp function
|
||||||
|
which has a non-nil property `lisp-indent-function',
|
||||||
|
that specifies how to do the indentation. The property value can be
|
||||||
|
* `defun', meaning indent `defun'-style;
|
||||||
|
* an integer N, meaning indent the first N arguments specially
|
||||||
|
like ordinary function arguments and then indent any further
|
||||||
|
aruments like a body;
|
||||||
|
* a function to call just as this function was called.
|
||||||
|
If that function returns nil, that means it doesn't specify
|
||||||
|
the indentation.
|
||||||
|
|
||||||
|
This function also returns nil meaning don't specify the indentation."
|
||||||
(let ((normal-indent (current-column)))
|
(let ((normal-indent (current-column)))
|
||||||
(goto-char (1+ (elt state 1)))
|
(goto-char (1+ (elt state 1)))
|
||||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
|
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue