home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / gnu / texinfo-3.1-bin.lha / info / texi.info-6 (.txt) < prev    next >
GNU Info File  |  1994-02-24  |  50KB  |  1,016 lines

  1. This is Info file texi.info, produced by Makeinfo-1.55 from the input
  2. file texi.texi.
  3.    This file documents Texinfo, a documentation system that uses a
  4. single source file to produce both on-line information and a printed
  5. manual.
  6.    Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation,
  7.    This is the second edition of the Texinfo documentation,
  8. and is consistent with version 2 of `texinfo.tex'.
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that
  14. the entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that this permission notice may be stated in a
  19. translation approved by the Free Software Foundation.
  20. File: texi.info,  Node: Inserting An Atsign,  Next: Inserting Braces,  Up: Braces Atsigns Periods
  21. Inserting `@' with @@
  22. ---------------------
  23.    `@@' stands for a single `@' in either printed or Info output.
  24.    Do not put braces after an `@@' command.
  25. File: texi.info,  Node: Inserting Braces,  Next: Controlling Spacing,  Prev: Inserting An Atsign,  Up: Braces Atsigns Periods
  26. Inserting `{' and `}'with @{ and @}
  27. -----------------------------------
  28.    `@{' stands for a single `{' in either printed or Info output.
  29.    `@}' stands for a single `}' in either printed or Info output.
  30.    Do not put braces after either an `@{' or an `@}' command.
  31. File: texi.info,  Node: Controlling Spacing,  Prev: Inserting Braces,  Up: Braces Atsigns Periods
  32. Spacing After Colons and Periods
  33. --------------------------------
  34.    Use the `@:' command after a period, question mark, exclamation
  35. mark, or colon that should not be followed by extra space.  For
  36. example, use `@:' after periods that end abbreviations which are not at
  37. the ends of sentences.  `@:' has no effect on the Info file output.
  38.    For example,
  39.      The s.o.p.@: has three parts ...
  40.      The s.o.p. has three parts ...
  41. produces
  42.      The s.o.p. has three parts ...
  43.      The s.o.p. has three parts ...
  44. `@:' has no effect on the Info output.  (`s.o.p' is an acronym for
  45. "Standard Operating Procedure".)
  46.    Use `@.' instead of a period at the end of a sentence that ends with
  47. a single capital letter.  Otherwise, TeX will think the letter is an
  48. abbreviation and will not insert the correct end-of-sentence spacing.
  49. Here is an example:
  50.      Give it to M.I.B. and to M.E.W@.  Also, give it to R.J.C@.
  51.      Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
  52. produces
  53.      Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
  54.      Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
  55.    In the Info file output, `@.' is equivalent to a simple `.'.
  56.    The meanings of `@:' and `@.' in Texinfo are designed to work well
  57. with the Emacs sentence motion commands.  This made it necessary for
  58. them to be incompatible with some other formatting systems that use
  59. @-commands.
  60.    Do not put braces after either an `@:' or an `@.' command.
  61. File: texi.info,  Node: dmn,  Next: Dots Bullets,  Prev: Braces Atsigns Periods,  Up: Insertions
  62. `@dmn'{DIMENSION}: Format a Dimension
  63. =====================================
  64.    At times, you may want to write `12pt' or `8.5in' with little or no
  65. space between the number and the abbreviation for the dimension.  You
  66. can use the `@dmn' command to do this.  On seeing the command, TeX
  67. inserts just enough space for proper typesetting; the Info formatting
  68. commands insert no space at all, since the Info file does not require
  69.    To use the `@dmn' command, write the number and then follow it
  70. immediately, with no intervening space, by `@dmn', and then by the
  71. dimension within braces.
  72. For example,
  73.      A4 paper is 8.27@dmn{in} wide.
  74. produces
  75.      A4 paper is 8.27in wide.
  76.    Not everyone uses this style.  Instead of writing `8.27@dmn{in}' in
  77. the Texinfo file, you may write `8.27 in.' or `8.27 inches'.  (In these
  78. cases, the formatters may insert a line break between the number and the
  79. dimension.  Also, if you write a period after an abbreviation within a
  80. sentence, you should write `@:' after the period to prevent TeX from
  81. inserting extra whitespace.  *Note Spacing After Colons and Periods:
  82. Controlling Spacing.)
  83. File: texi.info,  Node: Dots Bullets,  Next: TeX and copyright,  Prev: dmn,  Up: Insertions
  84. Inserting Ellipsis, Dots, and Bullets
  85. =====================================
  86.    An "ellipsis" (a line of dots) is not typeset as a string of
  87. periods, so a special command is used for ellipsis in Texinfo.  The
  88. `@bullet' command is special, too.  Each of these commands is followed
  89. by a pair of braces, `{}', without any whitespace between the name of
  90. the command and the braces.  (You need to use braces with these
  91. commands because you can use them next to other text; without the
  92. braces, the formatters would be confused.  *Note @-Command Syntax:
  93. Command Syntax, for further information.)
  94. * Menu:
  95. * dots::                        How to insert dots ...
  96. * bullet::                      How to insert a bullet.
  97. File: texi.info,  Node: dots,  Next: bullet,  Up: Dots Bullets
  98. `@dots'{}
  99. ---------
  100.    Use the `@dots{}' command to generate an ellipsis, which is three
  101. dots in a row, appropriately spaced, like this: `...'.  Do not simply
  102. write three periods in the input file; that would work for the Info
  103. file output, but would produce the wrong amount of space between the
  104. periods in the printed manual.
  105. File: texi.info,  Node: bullet,  Prev: dots,  Up: Dots Bullets
  106. `@bullet'{}
  107. -----------
  108.    Use the `@bullet{}' command to generate a large round dot, or the
  109. closest possible thing to one.  In Info, an asterisk is used.
  110.    Here is a bullet: *
  111.    When you use `@bullet' in `@itemize', you do not need to type the
  112. braces, because `@itemize' supplies them.  *Note itemize::.
  113. File: texi.info,  Node: TeX and copyright,  Next: minus,  Prev: Dots Bullets,  Up: Insertions
  114. Inserting TeX and the Copyright Symbol
  115. ======================================
  116.    The logo `TeX' is typeset in a special fashion and it needs an
  117. @-command.  The copyright symbol, `(C)', is also special.  Each of
  118. these commands is followed by a pair of braces, `{}', without any
  119. whitespace between the name of the command and the braces.
  120. * Menu:
  121. * tex::                         How to insert the TeX logo.
  122. * copyright symbol::            How to use `@copyright'{}.
  123. File: texi.info,  Node: tex,  Next: copyright symbol,  Up: TeX and copyright
  124. `@TeX'{}
  125. --------
  126.    Use the `@TeX{}' command to generate `TeX'.  In a printed manual,
  127. this is a special logo that is different from three ordinary letters.
  128. In Info, it just looks like `TeX'.  The `@TeX{}' command is unique
  129. among Texinfo commands in that the T and the X are in upper case.
  130. File: texi.info,  Node: copyright symbol,  Prev: tex,  Up: TeX and copyright
  131. `@copyright'{}
  132. --------------
  133.    Use the `@copyright{}' command to generate `(C)'.  In a printed
  134. manual, this is a `c' inside a circle, and in Info, this is `(C)'.
  135. File: texi.info,  Node: minus,  Prev: TeX and copyright,  Up: Insertions
  136. `@minus'{}: Inserting a Minus Sign
  137. ==================================
  138.    Use the `@minus{}' command to generate a minus sign.  In a
  139. fixed-width font, this is a single hyphen, but in a proportional font,
  140. the symbol is the customary length for a minus sign--a little longer
  141. than a hyphen.
  142.    You can compare the two forms:
  143.      `-' is a minus sign generated with `@minus{}',
  144.      
  145.      `-' is a hyphen generated with the character `-'.
  146. In the fixed-width font used by Info, `@minus{}' is the same as a
  147. hyphen.
  148.    You should not use `@minus{}' inside `@code' or `@example' because
  149. the width distinction is not made in the fixed-width font they use.
  150.    When you use `@minus' to specify the mark beginning each entry in an
  151. itemized list, you do not need to type the braces (*note itemize::.).
  152. File: texi.info,  Node: Glyphs,  Next: Breaks,  Prev: Insertions,  Up: Top
  153. Glyphs for Examples
  154. *******************
  155.    In Texinfo, code is often illustrated in examples that are delimited
  156. by `@example' and `@end example', or by `@lisp' and `@end lisp'.  In
  157. such examples, you can indicate the results of evaluation or an
  158. expansion using `=>' or `==>'.  Likewise, there are commands to insert
  159. glyphs to indicate printed output, error messages, equivalence of
  160. expressions, and the location of point.
  161.    The glyph-insertion commands do not need to be used within an
  162. example, but most often they are.  Every  glyph-insertion command is
  163. followed by a pair of left- and right-hand braces.
  164. * Menu:
  165. * Glyphs Summary::
  166. * result::                      How to show the result of expression.
  167. * expansion::                   How to indicate an expansion.
  168. * Print Glyph::                 How to indicate printed output.
  169. * Error Glyph::                 How to indicate an error message.
  170. * Equivalence::                 How to indicate equivalence.
  171. * Point Glyph::                 How to indicate the location of point.
  172. File: texi.info,  Node: Glyphs Summary,  Next: result,  Up: Glyphs
  173. Glyphs Summary
  174. ==============
  175.    Here are the different glyph commands:
  176.      `@result{}' points to the result of an expression.
  177.      `@expansion{}' shows the results of a macro expansion.
  178.      `@print{}' indicates printed output.
  179. error-->
  180.      `@error{}' indicates that the following text is an error message.
  181.      `@equiv{}' indicates the exact equivalence of two forms.
  182.      `@point{}' shows the location of point.
  183. File: texi.info,  Node: result,  Next: expansion,  Prev: Glyphs Summary,  Up: Glyphs
  184. =>: Indicating Evaluation
  185. =========================
  186.    Use the `@result{}' command to indicate the result of evaluating an
  187. expression.
  188.    The `@result{}' command is displayed as `=>' in Info and as a double
  189. stemmed arrow in the printed output.
  190.    Thus, the following,
  191.      (cdr '(1 2 3))
  192.           => (2 3)
  193. may be read as "`(cdr '(1 2 3))' evaluates to `(2 3)'".
  194. File: texi.info,  Node: expansion,  Next: Print Glyph,  Prev: result,  Up: Glyphs
  195. ==>: Indicating an Expansion
  196. ============================
  197.    When an expression is a macro call, it expands into a new expression.
  198. You can indicate the result of the expansion with the `@expansion{}'
  199. command.
  200.    The `@expansion{}' command is displayed as `==>' in Info and as a
  201. long arrow with a flat base in the printed output.
  202.    For example, the following
  203.      @lisp
  204.      (third '(a b c))
  205.           @expansion{} (car (cdr (cdr '(a b c))))
  206.           @result{} c
  207.      @end lisp
  208. produces
  209.      (third '(a b c))
  210.           ==> (car (cdr (cdr '(a b c))))
  211.           => c
  212. which may be read as:
  213.      `(third '(a b c))' expands to `(car (cdr (cdr '(a b c))))'; the
  214.      result of evaluating the expression is `c'.
  215. Often, as in this case, an example looks better if the `@expansion{}'
  216. and `@result{}' commands are indented five spaces.
  217. File: texi.info,  Node: Print Glyph,  Next: Error Glyph,  Prev: expansion,  Up: Glyphs
  218. -|: Indicating Printed Output
  219. =============================
  220.    Sometimes an expression will print output during its execution.  You
  221. can indicate the printed output with the `@print{}' command.
  222.    The `@print{}' command is displayed as `-|' in Info and similarly,
  223. as a horizontal dash butting against a vertical bar, in the printed
  224. output.
  225.    In the following example, the printed text is indicated with `-|',
  226. and the value of the expression follows on the last line.
  227.      (progn (print 'foo) (print 'bar))
  228.           -| foo
  229.           -| bar
  230.           => bar
  231. In a Texinfo source file, this example is written as follows:
  232.      @lisp
  233.      (progn (print 'foo) (print 'bar))
  234.           @print{} foo
  235.           @print{} bar
  236.           @result{} bar
  237.      @end lisp
  238. File: texi.info,  Node: Error Glyph,  Next: Equivalence,  Prev: Print Glyph,  Up: Glyphs
  239. error-->: Indicating an Error Message
  240. =====================================
  241.    A piece of code may cause an error when you evaluate it.  You can
  242. designate the error message with the `@error{}' command.
  243.    The `@error{}' command is displayed as `error-->' in Info and as the
  244. word `error' in a box in the printed output.
  245.    Thus,
  246.      @lisp
  247.      (+ 23 'x)
  248.      @error{} Wrong type argument: integer-or-marker-p, x
  249.      @end lisp
  250. produces
  251.      (+ 23 'x)
  252.      error--> Wrong type argument: integer-or-marker-p, x
  253. This indicates that the following error message is printed when you
  254. evaluate the expression:
  255.      Wrong type argument: integer-or-marker-p, x
  256.    Note that `error-->' itself is not part of the error message.
  257. File: texi.info,  Node: Equivalence,  Next: Point Glyph,  Prev: Error Glyph,  Up: Glyphs
  258. ==: Indicating Equivalence
  259. ==========================
  260.    Sometimes two expressions produce identical results.  You can
  261. indicate the exact equivalence of two forms with the `@equiv{}' command.
  262.    The `@equiv{}' command is displayed as `==' in Info and as a three
  263. parallel horizontal lines in the printed output.
  264.    Thus,
  265.      @lisp
  266.      (make-sparse-keymap) @equiv{} (list 'keymap)
  267.      @end lisp
  268. produces
  269.      (make-sparse-keymap) == (list 'keymap)
  270. This indicates that evaluating `(make-sparse-keymap)' produces
  271. identical results to evaluating `(list 'keymap)'.
  272. File: texi.info,  Node: Point Glyph,  Prev: Equivalence,  Up: Glyphs
  273. Indicating Point in a Buffer
  274. ============================
  275.    Sometimes you need to show an example of text in an Emacs buffer.  In
  276. such examples, the convention is to include the entire contents of the
  277. buffer in question between two lines of dashes containing the buffer
  278. name.
  279.    You can use the `@point{}' command to show the location of point in
  280. the text in the buffer.  (The symbol for point, of course, is not part
  281. of the text in the buffer; it indicates the place *between* two
  282. characters where point is located.)
  283.    The `@point{}' command is displayed as `-!-' in Info and as a small
  284. five pointed star in the printed output.
  285.    The following example shows the contents of buffer `foo' before and
  286. after evaluating a Lisp command to insert the word `changed'.
  287.      ---------- Buffer: foo ----------
  288.      This is the -!-contents of foo.
  289.      ---------- Buffer: foo ----------
  290.      (insert "changed ")
  291.           => nil
  292.      ---------- Buffer: foo ----------
  293.      This is the changed -!-contents of foo.
  294.      ---------- Buffer: foo ----------
  295.    In a Texinfo source file, the example is written like this:
  296.      @example
  297.      ---------- Buffer: foo ----------
  298.      This is the @point{}contents of foo.
  299.      ---------- Buffer: foo ----------
  300.      
  301.      (insert "changed ")
  302.           @result{} nil
  303.      ---------- Buffer: foo ----------
  304.      This is the changed @point{}contents of foo.
  305.      ---------- Buffer: foo ----------
  306.      @end example
  307. File: texi.info,  Node: Breaks,  Next: Definition Commands,  Prev: Glyphs,  Up: Top
  308. Making and Preventing Breaks
  309. ****************************
  310.    Usually, a Texinfo file is processed both by TeX and by one of the
  311. Info formatting commands.  Line, paragraph, or page breaks sometimes
  312. occur in the `wrong' place in one or other form of output.  You must
  313. ensure that text looks right both in the printed manual and in the Info
  314. file.
  315.    For example, in a printed manual, page breaks may occur awkwardly in
  316. the middle of an example; to prevent this, you can hold text together
  317. using a grouping command that keeps the text from being split across
  318. two pages.  Conversely, you may want to force a page break where none
  319. would occur normally.  Fortunately, problems like these do not often
  320. arise.  When they do, use the break, break prevention, or pagination
  321. commands.
  322. * Menu:
  323. * Break Commands::              Cause and prevent splits.
  324. * Line Breaks::                 How to force a single line to use two lines.
  325. * w::                           How to prevent unwanted line breaks.
  326. * sp::                          How to insert blank lines.
  327. * page::                        How to force the start of a new page.
  328. * group::                       How to prevent unwanted page breaks.
  329. * need::                        Another way to prevent unwanted page breaks.
  330. File: texi.info,  Node: Break Commands,  Next: Line Breaks,  Up: Breaks
  331. The Break Commands
  332. ==================
  333.    The break commands create line and paragraph breaks:
  334.      Force a line break.
  335. `@sp N'
  336.      Skip N blank lines.
  337.    The line-break-prevention command holds text together all on one
  338. line:
  339. `@w{TEXT}'
  340.      Prevent TEXT from being split and hyphenated across two lines.
  341.    The pagination commands apply only to printed output, since Info
  342. files do not have pages.
  343. `@page'
  344.      Start a new page in the printed manual.
  345. `@group'
  346.      Hold text together that must appear on one printed page.
  347. `@need MILS'
  348.      Start a new printed page if not enough space on this one.
  349. File: texi.info,  Node: Line Breaks,  Next: w,  Prev: Break Commands,  Up: Breaks
  350. `@*': Generate Line Breaks
  351. ==========================
  352.    The `@*' command forces a line break in both the printed manual and
  353. in Info.
  354.    For example,
  355.      This line @* is broken @*in two places.
  356. produces
  357.      This line
  358.       is broken
  359.      in two places.
  360. (Note that the space after the first `@*' command is faithfully carried
  361. down to the next line.)
  362.    The `@*' command is often used in a file's copyright page:
  363.      This is edition 2.0 of the Texinfo documentation,@*
  364.      and is for ...
  365. In this case, the `@*' command keeps TeX from stretching the line
  366. across the whole page in an ugly manner.
  367.      *Please note:* Do not write braces after an `@*' command; they are
  368.      not needed.
  369.      Do not write an `@refill' command at the end of a paragraph
  370.      containing an `@*' command; it will cause the paragraph to be
  371.      refilled after the line break occurs, negating the effect of the
  372.      line break.
  373. File: texi.info,  Node: w,  Next: sp,  Prev: Line Breaks,  Up: Breaks
  374. `@w'{TEXT}: Prevent Line Breaks
  375. ===============================
  376.    `@w{TEXT}' outputs TEXT and prohibits line breaks within TEXT.
  377.    You can use the `@w' command to prevent TeX from automatically
  378. hyphenating a long name or phrase that accidentally falls near the end
  379. of a line.
  380.      You can copy GNU software from @w{@file{prep.ai.mit.edu}}.
  381. produces
  382.      You can copy GNU software from `prep.ai.mit.edu'.
  383.    In the Texinfo file, you must write the `@w' command and its
  384. argument (all the affected text) all on one line.
  385.      *Caution:* Do not write an `@refill' command at the end of a
  386.      paragraph containing an `@w' command; it will cause the paragraph
  387.      to be refilled and may thereby negate the effect of the `@w'
  388.      command.
  389. File: texi.info,  Node: sp,  Next: page,  Prev: w,  Up: Breaks
  390. `@sp' N: Insert Blank Lines
  391. ===========================
  392.    A line beginning with and containing only `@sp N' generates N blank
  393. lines of space in both the printed manual and the Info file.  `@sp'
  394. also forces a paragraph break.  For example,
  395.      @sp 2
  396. generates two blank lines.
  397.    The `@sp' command is most often used in the title page.
  398. File: texi.info,  Node: page,  Next: group,  Prev: sp,  Up: Breaks
  399. `@page': Start a New Page
  400. =========================
  401.    A line containing only `@page' starts a new page in a printed
  402. manual.  The command has no effect on Info files since they are not
  403. paginated.  An `@page' command is often used in the `@titlepage'
  404. section of a Texinfo file to start the copyright page.
  405. File: texi.info,  Node: group,  Next: need,  Prev: page,  Up: Breaks
  406. `@group': Prevent Page Breaks
  407. =============================
  408.    The `@group' command (on a line by itself) is used inside an
  409. `@example' or similar construct to begin an unsplittable vertical
  410. group, which will appear entirely on one page in the printed output.
  411. The group is terminated by a line containing only `@end group'.  These
  412. two lines produce no output of their own, and in the Info file output
  413. they have no effect at all.
  414.    Although `@group' would make sense conceptually in a wide variety of
  415. contexts, its current implementation works reliably only within
  416. `@example' and variants, and within `@display', `@format', `@flushleft'
  417. and `@flushright'.  *Note Quotations and Examples::.  (What all these
  418. commands have in common is that each line of input produces a line of
  419. output.)  In other contexts, `@group' can cause anomalous vertical
  420. spacing.
  421.    This formatting requirement means that you should write:
  422.      @example
  423.      @group
  424.      ...
  425.      @end group
  426.      @end example
  427. with the `@group' and `@end group' commands inside the `@example' and
  428. `@end example' commands.
  429.    The `@group' command is most often used to hold an example together
  430. on one page.  In this Texinfo manual, more than 100 examples contain
  431. text that is enclosed between `@group' and `@end group'.
  432.    If you forget to end a group, you may get strange and unfathomable
  433. error messages when you run TeX.  This is because TeX keeps trying to
  434. put the rest of the Texinfo file onto the one page and does not start
  435. to generate error messages until it has processed considerable text.
  436. It is a good rule of thumb to look for a missing `@end group' if you
  437. get incomprehensible error messages in TeX.
  438. File: texi.info,  Node: need,  Prev: group,  Up: Breaks
  439. `@need MILS': Prevent Page Breaks
  440. =================================
  441.    A line containing only `@need N' starts a new page in a printed
  442. manual if fewer than N mils (thousandths of an inch) remain on the
  443. current page.  Do not use braces around the argument N.  The `@need'
  444. command has no effect on Info files since they are not paginated.
  445.    This paragraph is preceded by an `@need' command that tells TeX to
  446. start a new page if fewer than 800 mils (eight-tenths inch) remain on
  447. the page.  It looks like this:
  448.      @need 800
  449.      This paragraph is preceded by ...
  450.    The `@need' command is useful for preventing orphans (single lines
  451. at the bottoms of printed pages).
  452. File: texi.info,  Node: Definition Commands,  Next: Footnotes,  Prev: Breaks,  Up: Top
  453. Definition Commands
  454. *******************
  455.    The `@deffn' command and the other "definition commands" enable you
  456. to describe functions, variables, macros, commands, user options,
  457. special forms and other such artifacts in a uniform format.
  458.    In the Info file, a definition causes the entity
  459. category--`Function', `Variable', or whatever--to appear at the
  460. beginning of the first line of the definition, followed by the entity's
  461. name and arguments.  In the printed manual, the command causes TeX to
  462. print the entity's name and its arguments on the left margin and print
  463. the category next to the right margin.  In both output formats, the
  464. body of the definition is indented.  Also, the name of the entity is
  465. entered into the appropriate index: `@deffn' enters the name into the
  466. index of functions, `@defvr' enters it into the index of variables, and
  467. so on.
  468.    A manual need not and should not contain more than one definition for
  469. a given name.  An appendix containing a summary should use `@table'
  470. rather than the definition commands.
  471. * Menu:
  472. * Def Cmd Template::            How to structure a description using a
  473.                                   definition command.
  474. * Optional Arguments::          How to handle optional and repeated arguments.
  475. * deffnx::                      How to group two or more `first' lines.
  476. * Def Cmds in Detail::          All the definition commands.
  477. * Def Cmd Conventions::         Conventions for writing definitions.
  478. * Sample Function Definition::
  479. File: texi.info,  Node: Def Cmd Template,  Next: Optional Arguments,  Up: Definition Commands
  480. The Template for a Definition
  481. =============================
  482.    The `@deffn' command is used for definitions of entities that
  483. resemble functions.  To write a definition using the `@deffn' command,
  484. write the `@deffn' command at the beginning of a line and follow it on
  485. the same line by the category of the entity, the name of the entity
  486. itself, and its arguments (if any).  Then write the body of the
  487. definition on succeeding lines.  (You may embed examples in the body.)
  488. Finally, end the definition with an `@end deffn' command written on a
  489. line of its own.  (The other definition commands follow the same
  490. format.)
  491.    The template for a definition looks like this:
  492.      @deffn CATEGORY NAME ARGUMENTS...
  493.      BODY-OF-DEFINITION
  494.      @end deffn
  495. For example,
  496.      @deffn Command forward-word count
  497.      This command moves point forward @var{count} words
  498.      (or backward if @var{count} is negative). ...
  499.      @end deffn
  500. produces
  501.       - Command: forward-word COUNT
  502.           This function moves point forward COUNT words (or backward if
  503.           COUNT is negative). ...
  504.    Capitalize the category name like a title.  If the name of the
  505. category contains spaces, as in the phrase `Interactive Command', write
  506. braces around it.  For example:
  507.      @deffn {Interactive Command} isearch-forward
  508.      ...
  509.      @end deffn
  510. Otherwise, the second word will be mistaken for the name of the entity.
  511.    Some of the definition commands are more general than others.  The
  512. `@deffn' command, for example, is the general definition command for
  513. functions and the like--for entities that may take arguments.  When you
  514. use this command, you specify the category to which the entity belongs.
  515. The `@deffn' command possesses three predefined, specialized
  516. variations, `@defun', `@defmac', and `@defspec', that specify the
  517. category for you: "Function", "Macro", and "Special Form" respectively.
  518. The `@defvr' command also is accompanied by several predefined,
  519. specialized variations for describing particular kinds of variables.
  520.    The template for a specialized definition, such as `@defun', is
  521. similar to the template for a generalized definition, except that you
  522. do not need to specify the category:
  523.      @defun NAME ARGUMENTS...
  524.      BODY-OF-DEFINITION
  525.      @end defun
  526. Thus,
  527.      @defun buffer-end flag
  528.      This function returns @code{(point-min)} if @var{flag}
  529.      is less than 1, @code{(point-max)} otherwise.
  530.      ...
  531.      @end defun
  532. produces
  533.       - Function: buffer-end FLAG
  534.           This function returns `(point-min)' if FLAG is less than 1,
  535.           `(point-max)' otherwise.  ...
  536. *Note Sample Function Definition: Sample Function Definition, for a
  537. more detailed example of a function definition, including the use of
  538. `@example' inside the definition.
  539.    The other specialized commands work like `@defun'.
  540. File: texi.info,  Node: Optional Arguments,  Next: deffnx,  Prev: Def Cmd Template,  Up: Definition Commands
  541. Optional and Repeated Arguments
  542. ===============================
  543.    Some entities take optional or repeated arguments, which may be
  544. specified by a distinctive glyph that uses square brackets and
  545. ellipses.  For example, a special form often breaks its argument list
  546. into separate arguments in more complicated ways than a straightforward
  547. function.
  548.    An argument enclosed within square brackets is optional.  Thus,
  549. [OPTIONAL-ARG] means that OPTIONAL-ARG is optional.  An argument
  550. followed by an ellipsis is optional and may be repeated more than once.
  551. Thus, REPEATED-ARGS... stands for zero or more arguments.  Parentheses
  552. are used when several arguments are grouped into additional levels of
  553. list structure in Lisp.
  554.    Here is the `@defspec' line of an example of an imaginary special
  555. form:
  556.       - Special Form: foobar (VAR [FROM TO [INC]]) BODY...
  557. In this example, the arguments FROM and TO are optional, but must both
  558. be present or both absent.  If they are present, INC may optionally be
  559. specified as well.  These arguments are grouped with the argument VAR
  560. into a list, to distinguish them from BODY, which includes all
  561. remaining elements of the form.
  562.    In a Texinfo source file, this `@defspec' line is written like this
  563. (except it would not be split over two lines, as it is in this example).
  564.      @defspec foobar (@var{var} [@var{from} @var{to}
  565.           [@var{inc}]]) @var{body}@dots{}
  566. The function is listed in the Command and Variable Index under `foobar'.
  567. File: texi.info,  Node: deffnx,  Next: Def Cmds in Detail,  Prev: Optional Arguments,  Up: Definition Commands
  568. Two or More `First' Lines
  569. =========================
  570.    To create two or more `first' or header lines for a definition,
  571. follow the first `@deffn' line by a line beginning with `@deffnx'.  The
  572. `@deffnx' command works exactly like `@deffn' except that it does not
  573. generate extra vertical white space between it and the preceding line.
  574.    For example,
  575.      @deffn {Interactive Command} isearch-forward
  576.      @deffnx {Interactive Command} isearch-backward
  577.      These two search commands are similar except ...
  578.      @end deffn
  579. produces
  580.  - Interactive Command: isearch-forward
  581.  - Interactive Command: isearch-backward
  582.      These two search commands are similar except ...
  583.    Each of the other definition commands has an `x' form: `@defunx',
  584. `@defvrx', `@deftypefunx', etc.
  585.    The `x' forms work just like `@itemx'; see *Note `@itemx': itemx.
  586. File: texi.info,  Node: Def Cmds in Detail,  Next: Def Cmd Conventions,  Prev: deffnx,  Up: Definition Commands
  587. The Definition Commands
  588. =======================
  589.    Texinfo provides more than a dozen definition commands, all of which
  590. are described in this section.
  591.    The definition commands automatically enter the name of the entity in
  592. the appropriate index: for example, `@deffn', `@defun', and `@defmac'
  593. enter function names in the index of functions; `@defvr' and `@defvar'
  594. enter variable names in the index of variables.
  595.    Although the examples that follow mostly illustrate Lisp, the
  596. commands can be used for other programming languages.
  597. * Menu:
  598. * Functions Commands::          Commands for functions and similar entities.
  599. * Variables Commands::          Commands for variables and similar entities.
  600. * Typed Functions::             Commands for functions in typed languages.
  601. * Typed Variables::             Commands for variables in typed languages.
  602. * Abstract Objects::            Commands for object-oriented programming.
  603. * Data Types::                  The definition command for data types.
  604. File: texi.info,  Node: Functions Commands,  Next: Variables Commands,  Up: Def Cmds in Detail
  605. Functions and Similar Entities
  606. ------------------------------
  607.    This section describes the commands for describing functions and
  608. similar entities:
  609. `@deffn CATEGORY NAME ARGUMENTS...'
  610.      The `@deffn' command is the general definition command for
  611.      functions, interactive commands, and similar entities that may take
  612.      arguments.  You must choose a term to describe the category of
  613.      entity being defined; for example, "Function" could be used if the
  614.      entity is a function.  The `@deffn' command is written at the
  615.      beginning of a line and is followed on the same line by the
  616.      category of entity being described, the name of this particular
  617.      entity, and its arguments, if any.  Terminate the definition with
  618.      `@end deffn' on a line of its own.
  619.      For example, here is a definition:
  620.           @deffn Command forward-char nchars
  621.           Move point forward @var{nchars} characters.
  622.           @end deffn
  623.      This shows a rather terse definition for a "command" named
  624.      `forward-char' with one argument, NCHARS.
  625.      `@deffn' prints argument names such as NCHARS in italics or upper
  626.      case, as if `@var' had been used, because we think of these names
  627.      as metasyntactic variables--they stand for the actual argument
  628.      values.  Within the text of the description, write an argument name
  629.      explicitly with `@var' to refer to the value of the argument.  In
  630.      the example above, we used `@var{nchars}' in this way.
  631.      The template for `@deffn' is:
  632.           @deffn CATEGORY NAME ARGUMENTS...
  633.           BODY-OF-DEFINITION
  634.           @end deffn
  635. `@defun NAME ARGUMENTS...'
  636.      The `@defun' command is the definition command for functions.
  637.      `@defun' is equivalent to `@deffn Function ...'.
  638.      For example,
  639.           @defun set symbol new-value
  640.           Change the value of the symbol @var{symbol}
  641.           to @var{new-value}.
  642.           @end defun
  643.      shows a rather terse definition for a function `set' whose
  644.      arguments are SYMBOL and NEW-VALUE.  The argument names on the
  645.      `@defun' line automatically appear in italics or upper case as if
  646.      they were enclosed in `@var'.  Terminate the definition with `@end
  647.      defun' on a line of its own.
  648.      The template is:
  649.           @defun FUNCTION-NAME ARGUMENTS...
  650.           BODY-OF-DEFINITION
  651.           @end defun
  652.      `@defun' creates an entry in the index of functions.
  653. `@defmac NAME ARGUMENTS...'
  654.      The `@defmac' command is the definition command for macros.
  655.      `@defmac' is equivalent to `@deffn Macro ...' and works like
  656.      `@defun'.
  657. `@defspec NAME ARGUMENTS...'
  658.      The `@defspec' command is the definition command for special
  659.      forms.  (In Lisp, a special form is an entity much like a
  660.      function.) `@defspec' is equivalent to `@deffn {Special Form} ...'
  661.      and works like `@defun'.
  662. File: texi.info,  Node: Variables Commands,  Next: Typed Functions,  Prev: Functions Commands,  Up: Def Cmds in Detail
  663. Variables and Similar Entities
  664. ------------------------------
  665.    Here are the commands for defining variables and similar entities:
  666. `@defvr CATEGORY NAME'
  667.      The `@defvr' command is a general definition command for something
  668.      like a variable--an entity that records a value.  You must choose
  669.      a term to describe the category of entity being defined; for
  670.      example, "Variable" could be used if the entity is a variable.
  671.      Write the `@defvr' command at the beginning of a line and followed
  672.      it on the same line by the category of the entity and the name of
  673.      the entity.
  674.      Capitalize the category name like a title.  If the name of the
  675.      category contains spaces, as in the name `User Option', write
  676.      braces around it.  Otherwise, the second word will be mistaken for
  677.      the name of the entity, for example:
  678.           @defvr {User Option} fill-column
  679.           This buffer-local variable specifies
  680.           the maximum width of filled lines.
  681.           ...
  682.           @end defvr
  683.      Terminate the definition with `@end defvr' on a line of its own.
  684.      The template is:
  685.           @defvr CATEGORY NAME
  686.           BODY-OF-DEFINITION
  687.           @end defvr
  688.      `@defvr' creates an entry in the index of variables for NAME.
  689. `@defvar NAME'
  690.      The `@defvar' command is the definition command for variables.
  691.      `@defvar' is equivalent to `@defvr Variable ...'.
  692.      For example:
  693.           @defvar kill-ring
  694.           ...
  695.           @end defvar
  696.      The template is:
  697.           @defvar NAME
  698.           BODY-OF-DEFINITION
  699.           @end defvar
  700.      `@defvar' creates an entry in the index of variables for NAME.
  701. `@defopt NAME'
  702.      The `@defopt' command is the definition command for user options.
  703.      `@defopt' is equivalent to `@defvr {User Option} ...' and works
  704.      like `@defvar'.
  705. File: texi.info,  Node: Typed Functions,  Next: Typed Variables,  Prev: Variables Commands,  Up: Def Cmds in Detail
  706. Functions in Typed Languages
  707. ----------------------------
  708.    The `@deftypefn' command and its variations are for describing
  709. functions in C or any other language in which you must declare types of
  710. variables and functions.
  711. `@deftypefn CATEGORY DATA-TYPE NAME ARGUMENTS...'
  712.      The `@deftypefn' command is the general definition command for
  713.      functions and similar entities that may take arguments and that are
  714.      typed.  The `@deftypefn' command is written at the beginning of a
  715.      line and is followed on the same line by the category of entity
  716.      being described, the type of the returned value, the name of this
  717.      particular entity, and its arguments, if any.
  718.      For example,
  719.           @deftypefn {Library Function} int foobar
  720.              (int @var{foo}, float @var{bar})
  721.           ...
  722.           @end deftypefn
  723.      (where the text before the "...", shown above as two lines, would
  724.      actually be a single line in a real Texinfo file) produces the
  725.      following in Info:
  726.           -- Library Function: int foobar (int FOO, float BAR)
  727.           ...
  728.      This means that `foobar' is a "library function" that returns an
  729.      `int', and its arguments are FOO (an `int') and BAR (a `float').
  730.      The argument names that you write in `@deftypefn' are not subject
  731.      to an implicit `@var'--since the actual names of the arguments in
  732.      `@deftypefn' are typically scattered among data type names and
  733.      keywords, Texinfo cannot find them without help.  Instead, you
  734.      must write `@var' explicitly around the argument names.  In the
  735.      example above, the argument names are `foo' and `bar'.
  736.      The template for `@deftypefn' is:
  737.           @deftypefn CATEGORY DATA-TYPE NAME ARGUMENTS ...
  738.           BODY-OF-DESCRIPTION
  739.           @end deftypefn
  740.      Note that if the CATEGORY or DATA TYPE is more than one word then
  741.      it must be enclosed in braces to make it a single argument.
  742.      If you are describing a procedure in a language that has packages,
  743.      such as Ada, you might consider using `@deftypefn' in a manner
  744.      somewhat contrary to the convention described in the preceding
  745.      paragraphs.
  746.      For example:
  747.           @deftypefn stacks private push
  748.                   (@var{s}:in out stack;
  749.                   @var{n}:in integer)
  750.           ...
  751.           @end deftypefn
  752.      (The `@deftypefn' arguments are shown split into three lines, but
  753.      would be a single line in a real Texinfo file.)
  754.      In this instance, the procedure is classified as belonging to the
  755.      package `stacks' rather than classified as a `procedure' and its
  756.      data type is described as `private'.  (The name of the procedure
  757.      is `push', and its arguments are S and N.)
  758.      `@deftypefn' creates an entry in the index of functions for NAME.
  759. `@deftypefun DATA-TYPE NAME ARGUMENTS...'
  760.      The `@deftypefun' command is the specialized definition command
  761.      for functions in typed languages.  The command is equivalent to
  762.      `@deftypefn Function ...'.
  763.      Thus,
  764.           @deftypefun int foobar (int @var{foo}, float @var{bar})
  765.           ...
  766.           @end deftypefun
  767.      produces the following in Info:
  768.           -- Function: int foobar (int FOO, float BAR)
  769.           ...
  770.      The template is:
  771.           @deftypefun TYPE NAME ARGUMENTS...
  772.           BODY-OF-DESCRIPTION
  773.           @end deftypefun
  774.      `@deftypefun' creates an entry in the index of functions for NAME.
  775. File: texi.info,  Node: Typed Variables,  Next: Abstract Objects,  Prev: Typed Functions,  Up: Def Cmds in Detail
  776. Variables in Typed Languages
  777. ----------------------------
  778.    Variables in typed languages are handled in a manner similar to
  779. functions in typed languages.  *Note Typed Functions::.  The general
  780. definition command `@deftypevr' corresponds to `@deftypefn' and the
  781. specialized definition command `@deftypevar' corresponds to
  782. `@deftypefun'.
  783. `@deftypevr CATEGORY DATA-TYPE NAME'
  784.      The `@deftypevr' command is the general definition command for
  785.      something like a variable in a typed language--an entity that
  786.      records a value.  You must choose a term to describe the category
  787.      of the entity being defined; for example, "Variable" could be used
  788.      if the entity is a variable.
  789.      The `@deftypevr' command is written at the beginning of a line and
  790.      is followed on the same line by the category of the entity being
  791.      described, the data type, and the name of this particular entity.
  792.      For example:
  793.           @deftypevr {Global Flag} int enable
  794.           ...
  795.           @end deftypevr
  796.      produces the following in Info:
  797.           -- Global Flag: int enable
  798.           ...
  799.      The template is:
  800.           @deftypevr CATEGORY DATA-TYPE NAME
  801.           BODY-OF-DESCRIPTION
  802.           @end deftypevr
  803.      `@deftypevr' creates an entry in the index of variables for NAME.
  804. `@deftypevar DATA-TYPE NAME'
  805.      The `@deftypevar' command is the specialized definition command
  806.      for variables in typed languages.  `@deftypevar' is equivalent to
  807.      `@deftypevr Variable ...'.
  808.      For example:
  809.           @deftypevar int fubar
  810.           ...
  811.           @end deftypevar
  812.      produces the following in Info:
  813.           -- Variable: int fubar
  814.           ...
  815.      The template is:
  816.           @deftypevar DATA-TYPE NAME
  817.           BODY-OF-DESCRIPTION
  818.           @end deftypevar
  819.      `@deftypevar' creates an entry in the index of variables for NAME.
  820. File: texi.info,  Node: Abstract Objects,  Next: Data Types,  Prev: Typed Variables,  Up: Def Cmds in Detail
  821. Object-Oriented Programming
  822. ---------------------------
  823.    Here are the commands for formatting descriptions about abstract
  824. objects, such as are used in object-oriented programming.  A class is a
  825. defined type of abstract object.  An instance of a class is a
  826. particular object that has the type of the class.  An instance variable
  827. is a variable that belongs to the class but for which each instance has
  828. its own value.
  829.    In a definition, if the name of a class is truly a name defined in
  830. the programming system for a class, then you should write an `@code'
  831. around it.  Otherwise, it is printed in the usual text font.
  832. `@defcv CATEGORY CLASS NAME'
  833.      The `@defcv' command is the general definition command for
  834.      variables associated with classes in object-oriented programming.
  835.      The `@defcv' command is followed by three arguments: the category
  836.      of thing being defined, the class to which it belongs, and its
  837.      name.  Thus,
  838.           @defcv {Class Option} Window border-pattern
  839.           ...
  840.           @end defcv
  841.      illustrates how you would write the first line of a definition of
  842.      the `border-pattern' class option of the class `Window'.
  843.      The template is
  844.           @defcv CATEGORY CLASS NAME
  845.           ...
  846.           @end defcv
  847.      `@defcv' creates an entry in the index of variables.
  848. `@defivar CLASS NAME'
  849.      The `@defivar' command is the definition command for instance
  850.      variables in object-oriented programming.  `@defivar' is
  851.      equivalent to `@defcv {Instance Variable} ...'
  852.      The template is:
  853.           @defivar CLASS INSTANCE-VARIABLE-NAME
  854.           BODY-OF-DEFINITION
  855.           @end defivar
  856.      `@defivar' creates an entry in the index of variables.
  857. `@defop CATEGORY CLASS NAME ARGUMENTS...'
  858.      The `@defop' command is the general definition command for
  859.      entities that may resemble methods in object-oriented programming.
  860.      These entities take arguments, as functions do, but are associated
  861.      with particular classes of objects.
  862.      For example, some systems have constructs called "wrappers" that
  863.      are associated with classes as methods are, but that act more like
  864.      macros than like functions.  You could use `@defop Wrapper' to
  865.      describe one of these.
  866.      Sometimes it is useful to distinguish methods and "operations".
  867.      You can think of an operation as the specification for a method.
  868.      Thus, a window system might specify that all window classes have a
  869.      method named `expose'; we would say that this window system
  870.      defines an `expose' operation on windows in general.  Typically,
  871.      the operation has a name and also specifies the pattern of
  872.      arguments; all methods that implement the operation must accept
  873.      the same arguments, since applications that use the operation do
  874.      so without knowing which method will implement it.
  875.      Often it makes more sense to document operations than methods.  For
  876.      example, window application developers need to know about the
  877.      `expose' operation, but need not be concerned with whether a given
  878.      class of windows has its own method to implement this operation.
  879.      To describe this operation, you would write:
  880.           @defop Operation windows expose
  881.      The `@defop' command is written at the beginning of a line and is
  882.      followed on the same line by the overall name of the category of
  883.      operation, the name of the class of the operation, the name of the
  884.      operation, and its arguments, if any.
  885.      The template is:
  886.           @defop CATEGORY CLASS NAME ARGUMENTS...
  887.           BODY-OF-DEFINITION
  888.           @end defop
  889.      `@defop' creates an entry, such as ``expose' on `windows'', in the
  890.      index of functions.
  891. `@defmethod CLASS NAME ARGUMENTS...'
  892.      The `@defmethod' command is the definition command for methods in
  893.      object-oriented programming.  A method is a kind of function that
  894.      implements an operation for a particular class of objects and its
  895.      subclasses.  In the Lisp Machine, methods actually were functions,
  896.      but they were usually defined with `defmethod'.
  897.      `@defmethod' is equivalent to `@defop Method ...'.  The command is
  898.      written at the beginning of a line and is followed by the name of
  899.      the class of the method, the name of the method, and its
  900.      arguments, if any.
  901.      For example,
  902.           @defmethod `bar-class' bar-method argument
  903.           ...
  904.           @end defmethod
  905.      illustrates the definition for a method called `bar-method' of the
  906.      class `bar-class'.  The method takes an argument.
  907.      The template is:
  908.           @defmethod CLASS METHOD-NAME ARGUMENTS...
  909.           BODY-OF-DEFINITION
  910.           @end defmethod
  911.      `@defmethod' creates an entry in the index of functions, such as
  912.      ``bar-method' on `bar-class''.
  913. File: texi.info,  Node: Data Types,  Prev: Abstract Objects,  Up: Def Cmds in Detail
  914. Data Types
  915. ----------
  916.    Here is the command for data types:
  917. `@deftp CATEGORY NAME ATTRIBUTES...'
  918.      The `@deftp' command is the generic definition command for data
  919.      types.  The command is written at the beginning of a line and is
  920.      followed on the same line by the category, by the name of the type
  921.      (which is a word like `int' or `float'), and then by names of
  922.      attributes of objects of that type.  Thus, you could use this
  923.      command for describing `int' or `float', in which case you could
  924.      use `data type' as the category.  (A data type is a category of
  925.      certain objects for purposes of deciding which operations can be
  926.      performed on them.)
  927.      In Lisp, for example,  "pair" names a particular data type, and an
  928.      object of that type has two slots called the CAR and the CDR.
  929.      Here is how you would write the first line of a definition of
  930.      `pair'.
  931.           @deftp {Data type} pair car cdr
  932.           ...
  933.           @end deftp
  934.      The template is:
  935.           @deftp CATEGORY NAME-OF-TYPE ATTRIBUTES...
  936.           BODY-OF-DEFINITION
  937.           @end deftp
  938.      `@deftp' creates an entry in the index of data types.
  939. File: texi.info,  Node: Def Cmd Conventions,  Next: Sample Function Definition,  Prev: Def Cmds in Detail,  Up: Definition Commands
  940. Conventions for Writing Definitions
  941. ===================================
  942.    When you write a definition using `@deffn', `@defun', or one of the
  943. other definition commands, please take care to use arguments that
  944. indicate the meaning, as with the COUNT argument to the `forward-word'
  945. function.  Also, if the name of an argument contains the name of a
  946. type, such as INTEGER, take care that the argument actually is of that
  947. type.
  948. File: texi.info,  Node: Sample Function Definition,  Prev: Def Cmd Conventions,  Up: Definition Commands
  949. A Sample Function Definition
  950. ============================
  951.    A function definition uses the `@defun' and `@end defun' commands.
  952. The name of the function follows immediately after the `@defun' command
  953. and it is followed, on the same line, by the parameter list.
  954.    Here is a definition from `The GNU Emacs Lisp Reference Manual'.
  955. (*Note Calling Functions: (elisp)Calling Functions.)
  956.       - Function: apply FUNCTION &rest ARGUMENTS
  957.           `apply' calls FUNCTION with ARGUMENTS, just like `funcall'
  958.           but with one difference: the last of ARGUMENTS is a list of
  959.           arguments to give to FUNCTION, rather than a single argument.
  960.           We also say that this list is "appended" to the other
  961.           arguments.
  962.           `apply' returns the result of calling FUNCTION.  As with
  963.           `funcall', FUNCTION must either be a Lisp function or a
  964.           primitive function; special forms and macros do not make
  965.           sense in `apply'.
  966.                (setq f 'list)
  967.                     => list
  968.                (apply f 'x 'y 'z)
  969.                error--> Wrong type argument: listp, z
  970.                (apply '+ 1 2 '(3 4))
  971.                     => 10
  972.                (apply '+ '(1 2 3 4))
  973.                     => 10
  974.                
  975.                (apply 'append '((a b c) nil (x y z) nil))
  976.                     => (a b c x y z)
  977.           An interesting example of using `apply' is found in the
  978.           description of `mapcar'.
  979.    In the Texinfo source file, this example looks like this:
  980.      @defun apply function &rest arguments
  981.      
  982.      @code{apply} calls @var{function} with
  983.      @var{arguments}, just like @code{funcall} but with one
  984.      difference: the last of @var{arguments} is a list of
  985.      arguments to give to @var{function}, rather than a single
  986.      argument.  We also say that this list is @dfn{appended}
  987.      to the other arguments.
  988.      
  989.      @code{apply} returns the result of calling
  990.      @var{function}.  As with @code{funcall},
  991.      @var{function} must either be a Lisp function or a
  992.      primitive function; special forms and macros do not make
  993.      sense in @code{apply}.
  994.      
  995.      @example
  996.      (setq f 'list)
  997.           @result{} list
  998.      (apply f 'x 'y 'z)
  999.      @error{} Wrong type argument: listp, z
  1000.      (apply '+ 1 2 '(3 4))
  1001.           @result{} 10
  1002.      (apply '+ '(1 2 3 4))
  1003.           @result{} 10
  1004.      
  1005.      (apply 'append '((a b c) nil (x y z) nil))
  1006.           @result{} (a b c x y z)
  1007.      @end example
  1008.      
  1009.      An interesting example of using @code{apply} is found
  1010.      in the description of @code{mapcar}.@refill
  1011.      @end defun
  1012. In this manual, this function is listed in the Command and Variable
  1013. Index under `apply'.
  1014.    Ordinary variables and user options are described using a format like
  1015. that for functions except that variables do not take arguments.
  1016.