diff options
| author | Richard M. Stallman | 2001-11-25 19:35:29 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2001-11-25 19:35:29 +0000 |
| commit | 9fefa08b84e1e970f8a98c640ecd458bef989b3e (patch) | |
| tree | 021dcd14f3277a62f08ba4902b62460a1e2b78ea | |
| parent | ab7207af6f2d26834d15f66d14e7d21582ad5733 (diff) | |
| download | emacs-9fefa08b84e1e970f8a98c640ecd458bef989b3e.tar.gz emacs-9fefa08b84e1e970f8a98c640ecd458bef989b3e.zip | |
(lisp-indent-function): Add doc string.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mode.el | 20 |
2 files changed, 22 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6adde9fd33e..a7e4d895a61 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2001-11-25 Richard M. Stallman <rms@gnu.org> | 1 | 2001-11-25 Richard M. Stallman <rms@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/lisp-mode.el (lisp-indent-function): Add doc string. | ||
| 4 | |||
| 3 | * international/quail.el (quail-keyboard-layout-button): | 5 | * international/quail.el (quail-keyboard-layout-button): |
| 4 | Define button type. | 6 | Define button type. |
| 5 | (quail-keyboard-customize-button): Likewise. | 7 | (quail-keyboard-customize-button): Likewise. |
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index a077c9e3d3b..b27ef1cb3c6 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el | |||
| @@ -791,6 +791,26 @@ is the buffer position of the start of the containing expression." | |||
| 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) |