diff options
| author | Kenichi Handa | 2003-09-08 11:56:09 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2003-09-08 11:56:09 +0000 |
| commit | 463f5630a5e7cbe7f042bc1175d1fa1c4e98860f (patch) | |
| tree | 3287d0c628fea2249abf4635b3a4f45bedd6f8c4 /man/programs.texi | |
| parent | 4256310de631bd57c78b88b5131caa073315b3d7 (diff) | |
| download | emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.tar.gz emacs-463f5630a5e7cbe7f042bc1175d1fa1c4e98860f.zip | |
New directory
Diffstat (limited to 'man/programs.texi')
| -rw-r--r-- | man/programs.texi | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/man/programs.texi b/man/programs.texi index e3775569860..a6fa49b2ec7 100644 --- a/man/programs.texi +++ b/man/programs.texi | |||
| @@ -486,10 +486,49 @@ expression. | |||
| 486 | 486 | ||
| 487 | @cindex @code{lisp-indent-function} property | 487 | @cindex @code{lisp-indent-function} property |
| 488 | You can override the standard pattern in various ways for individual | 488 | You can override the standard pattern in various ways for individual |
| 489 | functions, according to the @code{lisp-indent-function} property of | 489 | functions, according to the @code{lisp-indent-function} property of the |
| 490 | the function name. Normally you would use this for macro definitions | 490 | function name. There are four possibilities for this property: |
| 491 | and specify it using the @code{declare} construct (@pxref{Defining | 491 | |
| 492 | Macros,,, elisp, the Emacs Lisp Reference Manual}). | 492 | @table @asis |
| 493 | @item @code{nil} | ||
| 494 | This is the same as no property---use the standard indentation pattern. | ||
| 495 | @item @code{defun} | ||
| 496 | Handle this function like a @samp{def} construct: treat the second | ||
| 497 | line as the start of a @dfn{body}. | ||
| 498 | @item a number, @var{number} | ||
| 499 | The first @var{number} arguments of the function are | ||
| 500 | @dfn{distinguished} arguments; the rest are considered the body | ||
| 501 | of the expression. A line in the expression is indented according to | ||
| 502 | whether the first argument on it is distinguished or not. If the | ||
| 503 | argument is part of the body, the line is indented @code{lisp-body-indent} | ||
| 504 | more columns than the open-parenthesis starting the containing | ||
| 505 | expression. If the argument is distinguished and is either the first | ||
| 506 | or second argument, it is indented @emph{twice} that many extra columns. | ||
| 507 | If the argument is distinguished and not the first or second argument, | ||
| 508 | the line uses the standard pattern. | ||
| 509 | @item a symbol, @var{symbol} | ||
| 510 | @var{symbol} should be a function name; that function is called to | ||
| 511 | calculate the indentation of a line within this expression. The | ||
| 512 | function receives two arguments: | ||
| 513 | @table @asis | ||
| 514 | @item @var{state} | ||
| 515 | The value returned by @code{parse-partial-sexp} (a Lisp primitive for | ||
| 516 | indentation and nesting computation) when it parses up to the | ||
| 517 | beginning of this line. | ||
| 518 | @item @var{pos} | ||
| 519 | The position at which the line being indented begins. | ||
| 520 | @end table | ||
| 521 | @noindent | ||
| 522 | It should return either a number, which is the number of columns of | ||
| 523 | indentation for that line, or a list whose car is such a number. The | ||
| 524 | difference between returning a number and returning a list is that a | ||
| 525 | number says that all following lines at the same nesting level should | ||
| 526 | be indented just like this one; a list says that following lines might | ||
| 527 | call for different indentations. This makes a difference when the | ||
| 528 | indentation is being computed by @kbd{C-M-q}; if the value is a | ||
| 529 | number, @kbd{C-M-q} need not recalculate indentation for the following | ||
| 530 | lines until the end of the list. | ||
| 531 | @end table | ||
| 493 | 532 | ||
| 494 | @node C Indent | 533 | @node C Indent |
| 495 | @subsection Commands for C Indentation | 534 | @subsection Commands for C Indentation |
| @@ -2283,7 +2322,3 @@ Insert or align a comment. | |||
| 2283 | 2322 | ||
| 2284 | The variable @code{asm-comment-char} specifies which character | 2323 | The variable @code{asm-comment-char} specifies which character |
| 2285 | starts comments in assembler syntax. | 2324 | starts comments in assembler syntax. |
| 2286 | |||
| 2287 | @ignore | ||
| 2288 | arch-tag: c7ee7409-40a4-45c7-bfb7-ae7f2c74d0c0 | ||
| 2289 | @end ignore | ||