summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/texinfo/info-files/texi.info-6
blob: cac7b3ab88ddd5708e2b671eb76207f807ad79e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
This is Info file texi.info, produced by Makeinfo-1.55 from the input
file texi.texi.

   This file documents Texinfo, a documentation system that uses a
single source file to produce both on-line information and a printed
manual.

   Copyright (C) 1988, 1990, 1991, 1992, 1993 Free Software Foundation,
Inc.

   This is the second edition of the Texinfo documentation,
and is consistent with version 2 of `texinfo.tex'.

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that
the entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the Free Software Foundation.


File: texi.info,  Node: Inserting An Atsign,  Next: Inserting Braces,  Up: Braces Atsigns Periods

Inserting `@' with @@
---------------------

   `@@' stands for a single `@' in either printed or Info output.

   Do not put braces after an `@@' command.


File: texi.info,  Node: Inserting Braces,  Next: Controlling Spacing,  Prev: Inserting An Atsign,  Up: Braces Atsigns Periods

Inserting `{' and `}'with @{ and @}
-----------------------------------

   `@{' stands for a single `{' in either printed or Info output.

   `@}' stands for a single `}' in either printed or Info output.

   Do not put braces after either an `@{' or an `@}' command.


File: texi.info,  Node: Controlling Spacing,  Prev: Inserting Braces,  Up: Braces Atsigns Periods

Spacing After Colons and Periods
--------------------------------

   Use the `@:' command after a period, question mark, exclamation
mark, or colon that should not be followed by extra space.  For
example, use `@:' after periods that end abbreviations which are not at
the ends of sentences.  `@:' has no effect on the Info file output.

   For example,

     The s.o.p.@: has three parts ...
     The s.o.p. has three parts ...

produces

     The s.o.p. has three parts ...
     The s.o.p. has three parts ...

`@:' has no effect on the Info output.  (`s.o.p' is an acronym for
"Standard Operating Procedure".)

   Use `@.' instead of a period at the end of a sentence that ends with
a single capital letter.  Otherwise, TeX will think the letter is an
abbreviation and will not insert the correct end-of-sentence spacing.
Here is an example:

     Give it to M.I.B. and to M.E.W@.  Also, give it to R.J.C@.
     Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.

produces

     Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.
     Give it to M.I.B. and to M.E.W.  Also, give it to R.J.C.

   In the Info file output, `@.' is equivalent to a simple `.'.

   The meanings of `@:' and `@.' in Texinfo are designed to work well
with the Emacs sentence motion commands.  This made it necessary for
them to be incompatible with some other formatting systems that use
@-commands.

   Do not put braces after either an `@:' or an `@.' command.


File: texi.info,  Node: dmn,  Next: Dots Bullets,  Prev: Braces Atsigns Periods,  Up: Insertions

`@dmn'{DIMENSION}: Format a Dimension
=====================================

   At times, you may want to write `12pt' or `8.5in' with little or no
space between the number and the abbreviation for the dimension.  You
can use the `@dmn' command to do this.  On seeing the command, TeX
inserts just enough space for proper typesetting; the Info formatting
commands insert no space at all, since the Info file does not require
it.

   To use the `@dmn' command, write the number and then follow it
immediately, with no intervening space, by `@dmn', and then by the
dimension within braces.

For example,

     A4 paper is 8.27@dmn{in} wide.

produces

     A4 paper is 8.27in wide.

   Not everyone uses this style.  Instead of writing `8.27@dmn{in}' in
the Texinfo file, you may write `8.27 in.' or `8.27 inches'.  (In these
cases, the formatters may insert a line break between the number and the
dimension.  Also, if you write a period after an abbreviation within a
sentence, you should write `@:' after the period to prevent TeX from
inserting extra whitespace.  *Note Spacing After Colons and Periods:
Controlling Spacing.)


File: texi.info,  Node: Dots Bullets,  Next: TeX and copyright,  Prev: dmn,  Up: Insertions

Inserting Ellipsis, Dots, and Bullets
=====================================

   An "ellipsis" (a line of dots) is not typeset as a string of
periods, so a special command is used for ellipsis in Texinfo.  The
`@bullet' command is special, too.  Each of these commands is followed
by a pair of braces, `{}', without any whitespace between the name of
the command and the braces.  (You need to use braces with these
commands because you can use them next to other text; without the
braces, the formatters would be confused.  *Note @-Command Syntax:
Command Syntax, for further information.)

* Menu:

* dots::                        How to insert dots ...
* bullet::                      How to insert a bullet.


File: texi.info,  Node: dots,  Next: bullet,  Up: Dots Bullets

`@dots'{}
---------

   Use the `@dots{}' command to generate an ellipsis, which is three
dots in a row, appropriately spaced, like this: `...'.  Do not simply
write three periods in the input file; that would work for the Info
file output, but would produce the wrong amount of space between the
periods in the printed manual.


File: texi.info,  Node: bullet,  Prev: dots,  Up: Dots Bullets

`@bullet'{}
-----------

   Use the `@bullet{}' command to generate a large round dot, or the
closest possible thing to one.  In Info, an asterisk is used.

   Here is a bullet: *

   When you use `@bullet' in `@itemize', you do not need to type the
braces, because `@itemize' supplies them.  *Note itemize::.


File: texi.info,  Node: TeX and copyright,  Next: minus,  Prev: Dots Bullets,  Up: Insertions

Inserting TeX and the Copyright Symbol
======================================

   The logo `TeX' is typeset in a special fashion and it needs an
@-command.  The copyright symbol, `(C)', is also special.  Each of
these commands is followed by a pair of braces, `{}', without any
whitespace between the name of the command and the braces.

* Menu:

* tex::                         How to insert the TeX logo.
* copyright symbol::            How to use `@copyright'{}.


File: texi.info,  Node: tex,  Next: copyright symbol,  Up: TeX and copyright

`@TeX'{}
--------

   Use the `@TeX{}' command to generate `TeX'.  In a printed manual,
this is a special logo that is different from three ordinary letters.
In Info, it just looks like `TeX'.  The `@TeX{}' command is unique
among Texinfo commands in that the T and the X are in upper case.


File: texi.info,  Node: copyright symbol,  Prev: tex,  Up: TeX and copyright

`@copyright'{}
--------------

   Use the `@copyright{}' command to generate `(C)'.  In a printed
manual, this is a `c' inside a circle, and in Info, this is `(C)'.


File: texi.info,  Node: minus,  Prev: TeX and copyright,  Up: Insertions

`@minus'{}: Inserting a Minus Sign
==================================

   Use the `@minus{}' command to generate a minus sign.  In a
fixed-width font, this is a single hyphen, but in a proportional font,
the symbol is the customary length for a minus sign--a little longer
than a hyphen.

   You can compare the two forms:

     `-' is a minus sign generated with `@minus{}',
     
     `-' is a hyphen generated with the character `-'.

In the fixed-width font used by Info, `@minus{}' is the same as a
hyphen.

   You should not use `@minus{}' inside `@code' or `@example' because
the width distinction is not made in the fixed-width font they use.

   When you use `@minus' to specify the mark beginning each entry in an
itemized list, you do not need to type the braces (*note itemize::.).


File: texi.info,  Node: Glyphs,  Next: Breaks,  Prev: Insertions,  Up: Top

Glyphs for Examples
*******************

   In Texinfo, code is often illustrated in examples that are delimited
by `@example' and `@end example', or by `@lisp' and `@end lisp'.  In
such examples, you can indicate the results of evaluation or an
expansion using `=>' or `==>'.  Likewise, there are commands to insert
glyphs to indicate printed output, error messages, equivalence of
expressions, and the location of point.

   The glyph-insertion commands do not need to be used within an
example, but most often they are.  Every  glyph-insertion command is
followed by a pair of left- and right-hand braces.

* Menu:

* Glyphs Summary::
* result::                      How to show the result of expression.
* expansion::                   How to indicate an expansion.
* Print Glyph::                 How to indicate printed output.
* Error Glyph::                 How to indicate an error message.
* Equivalence::                 How to indicate equivalence.
* Point Glyph::                 How to indicate the location of point.


File: texi.info,  Node: Glyphs Summary,  Next: result,  Up: Glyphs

Glyphs Summary
==============

   Here are the different glyph commands:

=>
     `@result{}' points to the result of an expression.

==>
     `@expansion{}' shows the results of a macro expansion.

-|
     `@print{}' indicates printed output.

error-->
     `@error{}' indicates that the following text is an error message.

==
     `@equiv{}' indicates the exact equivalence of two forms.

-!-
     `@point{}' shows the location of point.


File: texi.info,  Node: result,  Next: expansion,  Prev: Glyphs Summary,  Up: Glyphs

=>: Indicating Evaluation
=========================

   Use the `@result{}' command to indicate the result of evaluating an
expression.

   The `@result{}' command is displayed as `=>' in Info and as a double
stemmed arrow in the printed output.

   Thus, the following,

     (cdr '(1 2 3))
          => (2 3)

may be read as "`(cdr '(1 2 3))' evaluates to `(2 3)'".


File: texi.info,  Node: expansion,  Next: Print Glyph,  Prev: result,  Up: Glyphs

==>: Indicating an Expansion
============================

   When an expression is a macro call, it expands into a new expression.
You can indicate the result of the expansion with the `@expansion{}'
command.

   The `@expansion{}' command is displayed as `==>' in Info and as a
long arrow with a flat base in the printed output.

   For example, the following

     @lisp
     (third '(a b c))
          @expansion{} (car (cdr (cdr '(a b c))))
          @result{} c
     @end lisp

produces

     (third '(a b c))
          ==> (car (cdr (cdr '(a b c))))
          => c

which may be read as:

     `(third '(a b c))' expands to `(car (cdr (cdr '(a b c))))'; the
     result of evaluating the expression is `c'.

Often, as in this case, an example looks better if the `@expansion{}'
and `@result{}' commands are indented five spaces.


File: texi.info,  Node: Print Glyph,  Next: Error Glyph,  Prev: expansion,  Up: Glyphs

-|: Indicating Printed Output
=============================

   Sometimes an expression will print output during its execution.  You
can indicate the printed output with the `@print{}' command.

   The `@print{}' command is displayed as `-|' in Info and similarly,
as a horizontal dash butting against a vertical bar, in the printed
output.

   In the following example, the printed text is indicated with `-|',
and the value of the expression follows on the last line.

     (progn (print 'foo) (print 'bar))
          -| foo
          -| bar
          => bar

In a Texinfo source file, this example is written as follows:

     @lisp
     (progn (print 'foo) (print 'bar))
          @print{} foo
          @print{} bar
          @result{} bar
     @end lisp


File: texi.info,  Node: Error Glyph,  Next: Equivalence,  Prev: Print Glyph,  Up: Glyphs

error-->: Indicating an Error Message
=====================================

   A piece of code may cause an error when you evaluate it.  You can
designate the error message with the `@error{}' command.

   The `@error{}' command is displayed as `error-->' in Info and as the
word `error' in a box in the printed output.

   Thus,

     @lisp
     (+ 23 'x)
     @error{} Wrong type argument: integer-or-marker-p, x
     @end lisp

produces

     (+ 23 'x)
     error--> Wrong type argument: integer-or-marker-p, x

This indicates that the following error message is printed when you
evaluate the expression:

     Wrong type argument: integer-or-marker-p, x

   Note that `error-->' itself is not part of the error message.


File: texi.info,  Node: Equivalence,  Next: Point Glyph,  Prev: Error Glyph,  Up: Glyphs

==: Indicating Equivalence
==========================

   Sometimes two expressions produce identical results.  You can
indicate the exact equivalence of two forms with the `@equiv{}' command.

   The `@equiv{}' command is displayed as `==' in Info and as a three
parallel horizontal lines in the printed output.

   Thus,

     @lisp
     (make-sparse-keymap) @equiv{} (list 'keymap)
     @end lisp

produces

     (make-sparse-keymap) == (list 'keymap)

This indicates that evaluating `(make-sparse-keymap)' produces
identical results to evaluating `(list 'keymap)'.


File: texi.info,  Node: Point Glyph,  Prev: Equivalence,  Up: Glyphs

Indicating Point in a Buffer
============================

   Sometimes you need to show an example of text in an Emacs buffer.  In
such examples, the convention is to include the entire contents of the
buffer in question between two lines of dashes containing the buffer
name.

   You can use the `@point{}' command to show the location of point in
the text in the buffer.  (The symbol for point, of course, is not part
of the text in the buffer; it indicates the place *between* two
characters where point is located.)

   The `@point{}' command is displayed as `-!-' in Info and as a small
five pointed star in the printed output.

   The following example shows the contents of buffer `foo' before and
after evaluating a Lisp command to insert the word `changed'.

     ---------- Buffer: foo ----------
     This is the -!-contents of foo.
     ---------- Buffer: foo ----------

     (insert "changed ")
          => nil
     ---------- Buffer: foo ----------
     This is the changed -!-contents of foo.
     ---------- Buffer: foo ----------

   In a Texinfo source file, the example is written like this:

     @example
     ---------- Buffer: foo ----------
     This is the @point{}contents of foo.
     ---------- Buffer: foo ----------
     
     (insert "changed ")
          @result{} nil
     ---------- Buffer: foo ----------
     This is the changed @point{}contents of foo.
     ---------- Buffer: foo ----------
     @end example


File: texi.info,  Node: Breaks,  Next: Definition Commands,  Prev: Glyphs,  Up: Top

Making and Preventing Breaks
****************************

   Usually, a Texinfo file is processed both by TeX and by one of the
Info formatting commands.  Line, paragraph, or page breaks sometimes
occur in the `wrong' place in one or other form of output.  You must
ensure that text looks right both in the printed manual and in the Info
file.

   For example, in a printed manual, page breaks may occur awkwardly in
the middle of an example; to prevent this, you can hold text together
using a grouping command that keeps the text from being split across
two pages.  Conversely, you may want to force a page break where none
would occur normally.  Fortunately, problems like these do not often
arise.  When they do, use the break, break prevention, or pagination
commands.

* Menu:

* Break Commands::              Cause and prevent splits.
* Line Breaks::                 How to force a single line to use two lines.
* w::                           How to prevent unwanted line breaks.
* sp::                          How to insert blank lines.
* page::                        How to force the start of a new page.
* group::                       How to prevent unwanted page breaks.
* need::                        Another way to prevent unwanted page breaks.


File: texi.info,  Node: Break Commands,  Next: Line Breaks,  Up: Breaks

The Break Commands
==================

   The break commands create line and paragraph breaks:

`@*'
     Force a line break.

`@sp N'
     Skip N blank lines.

   The line-break-prevention command holds text together all on one
line:

`@w{TEXT}'
     Prevent TEXT from being split and hyphenated across two lines.

   The pagination commands apply only to printed output, since Info
files do not have pages.

`@page'
     Start a new page in the printed manual.

`@group'
     Hold text together that must appear on one printed page.

`@need MILS'
     Start a new printed page if not enough space on this one.


File: texi.info,  Node: Line Breaks,  Next: w,  Prev: Break Commands,  Up: Breaks

`@*': Generate Line Breaks
==========================

   The `@*' command forces a line break in both the printed manual and
in Info.

   For example,

     This line @* is broken @*in two places.

produces

     This line
      is broken
     in two places.

(Note that the space after the first `@*' command is faithfully carried
down to the next line.)

   The `@*' command is often used in a file's copyright page:

     This is edition 2.0 of the Texinfo documentation,@*
     and is for ...

In this case, the `@*' command keeps TeX from stretching the line
across the whole page in an ugly manner.

     *Please note:* Do not write braces after an `@*' command; they are
     not needed.

     Do not write an `@refill' command at the end of a paragraph
     containing an `@*' command; it will cause the paragraph to be
     refilled after the line break occurs, negating the effect of the
     line break.


File: texi.info,  Node: w,  Next: sp,  Prev: Line Breaks,  Up: Breaks

`@w'{TEXT}: Prevent Line Breaks
===============================

   `@w{TEXT}' outputs TEXT and prohibits line breaks within TEXT.

   You can use the `@w' command to prevent TeX from automatically
hyphenating a long name or phrase that accidentally falls near the end
of a line.

     You can copy GNU software from @w{@file{prep.ai.mit.edu}}.

produces

     You can copy GNU software from `prep.ai.mit.edu'.

   In the Texinfo file, you must write the `@w' command and its
argument (all the affected text) all on one line.

     *Caution:* Do not write an `@refill' command at the end of a
     paragraph containing an `@w' command; it will cause the paragraph
     to be refilled and may thereby negate the effect of the `@w'
     command.


File: texi.info,  Node: sp,  Next: page,  Prev: w,  Up: Breaks

`@sp' N: Insert Blank Lines
===========================

   A line beginning with and containing only `@sp N' generates N blank
lines of space in both the printed manual and the Info file.  `@sp'
also forces a paragraph break.  For example,

     @sp 2

generates two blank lines.

   The `@sp' command is most often used in the title page.


File: texi.info,  Node: page,  Next: group,  Prev: sp,  Up: Breaks

`@page': Start a New Page
=========================

   A line containing only `@page' starts a new page in a printed
manual.  The command has no effect on Info files since they are not
paginated.  An `@page' command is often used in the `@titlepage'
section of a Texinfo file to start the copyright page.


File: texi.info,  Node: group,  Next: need,  Prev: page,  Up: Breaks

`@group': Prevent Page Breaks
=============================

   The `@group' command (on a line by itself) is used inside an
`@example' or similar construct to begin an unsplittable vertical
group, which will appear entirely on one page in the printed output.
The group is terminated by a line containing only `@end group'.  These
two lines produce no output of their own, and in the Info file output
they have no effect at all.

   Although `@group' would make sense conceptually in a wide variety of
contexts, its current implementation works reliably only within
`@example' and variants, and within `@display', `@format', `@flushleft'
and `@flushright'.  *Note Quotations and Examples::.  (What all these
commands have in common is that each line of input produces a line of
output.)  In other contexts, `@group' can cause anomalous vertical
spacing.

   This formatting requirement means that you should write:

     @example
     @group
     ...
     @end group
     @end example

with the `@group' and `@end group' commands inside the `@example' and
`@end example' commands.

   The `@group' command is most often used to hold an example together
on one page.  In this Texinfo manual, more than 100 examples contain
text that is enclosed between `@group' and `@end group'.

   If you forget to end a group, you may get strange and unfathomable
error messages when you run TeX.  This is because TeX keeps trying to
put the rest of the Texinfo file onto the one page and does not start
to generate error messages until it has processed considerable text.
It is a good rule of thumb to look for a missing `@end group' if you
get incomprehensible error messages in TeX.


File: texi.info,  Node: need,  Prev: group,  Up: Breaks

`@need MILS': Prevent Page Breaks
=================================

   A line containing only `@need N' starts a new page in a printed
manual if fewer than N mils (thousandths of an inch) remain on the
current page.  Do not use braces around the argument N.  The `@need'
command has no effect on Info files since they are not paginated.

   This paragraph is preceded by an `@need' command that tells TeX to
start a new page if fewer than 800 mils (eight-tenths inch) remain on
the page.  It looks like this:

     @need 800
     This paragraph is preceded by ...

   The `@need' command is useful for preventing orphans (single lines
at the bottoms of printed pages).


File: texi.info,  Node: Definition Commands,  Next: Footnotes,  Prev: Breaks,  Up: Top

Definition Commands
*******************

   The `@deffn' command and the other "definition commands" enable you
to describe functions, variables, macros, commands, user options,
special forms and other such artifacts in a uniform format.

   In the Info file, a definition causes the entity
category--`Function', `Variable', or whatever--to appear at the
beginning of the first line of the definition, followed by the entity's
name and arguments.  In the printed manual, the command causes TeX to
print the entity's name and its arguments on the left margin and print
the category next to the right margin.  In both output formats, the
body of the definition is indented.  Also, the name of the entity is
entered into the appropriate index: `@deffn' enters the name into the
index of functions, `@defvr' enters it into the index of variables, and
so on.

   A manual need not and should not contain more than one definition for
a given name.  An appendix containing a summary should use `@table'
rather than the definition commands.

* Menu:

* Def Cmd Template::            How to structure a description using a
                                  definition command.
* Optional Arguments::          How to handle optional and repeated arguments.
* deffnx::                      How to group two or more `first' lines.
* Def Cmds in Detail::          All the definition commands.
* Def Cmd Conventions::         Conventions for writing definitions.
* Sample Function Definition::


File: texi.info,  Node: Def Cmd Template,  Next: Optional Arguments,  Up: Definition Commands

The Template for a Definition
=============================

   The `@deffn' command is used for definitions of entities that
resemble functions.  To write a definition using the `@deffn' command,
write the `@deffn' command at the beginning of a line and follow it on
the same line by the category of the entity, the name of the entity
itself, and its arguments (if any).  Then write the body of the
definition on succeeding lines.  (You may embed examples in the body.)
Finally, end the definition with an `@end deffn' command written on a
line of its own.  (The other definition commands follow the same
format.)

   The template for a definition looks like this:

     @deffn CATEGORY NAME ARGUMENTS...
     BODY-OF-DEFINITION
     @end deffn

For example,

     @deffn Command forward-word count
     This command moves point forward @var{count} words
     (or backward if @var{count} is negative). ...
     @end deffn

produces

      - Command: forward-word COUNT
          This function moves point forward COUNT words (or backward if
          COUNT is negative). ...

   Capitalize the category name like a title.  If the name of the
category contains spaces, as in the phrase `Interactive Command', write
braces around it.  For example:

     @deffn {Interactive Command} isearch-forward
     ...
     @end deffn

Otherwise, the second word will be mistaken for the name of the entity.

   Some of the definition commands are more general than others.  The
`@deffn' command, for example, is the general definition command for
functions and the like--for entities that may take arguments.  When you
use this command, you specify the category to which the entity belongs.
The `@deffn' command possesses three predefined, specialized
variations, `@defun', `@defmac', and `@defspec', that specify the
category for you: "Function", "Macro", and "Special Form" respectively.
The `@defvr' command also is accompanied by several predefined,
specialized variations for describing particular kinds of variables.

   The template for a specialized definition, such as `@defun', is
similar to the template for a generalized definition, except that you
do not need to specify the category:

     @defun NAME ARGUMENTS...
     BODY-OF-DEFINITION
     @end defun

Thus,

     @defun buffer-end flag
     This function returns @code{(point-min)} if @var{flag}
     is less than 1, @code{(point-max)} otherwise.
     ...
     @end defun

produces

      - Function: buffer-end FLAG
          This function returns `(point-min)' if FLAG is less than 1,
          `(point-max)' otherwise.  ...

*Note Sample Function Definition: Sample Function Definition, for a
more detailed example of a function definition, including the use of
`@example' inside the definition.

   The other specialized commands work like `@defun'.


File: texi.info,  Node: Optional Arguments,  Next: deffnx,  Prev: Def Cmd Template,  Up: Definition Commands

Optional and Repeated Arguments
===============================

   Some entities take optional or repeated arguments, which may be
specified by a distinctive glyph that uses square brackets and
ellipses.  For example, a special form often breaks its argument list
into separate arguments in more complicated ways than a straightforward
function.

   An argument enclosed within square brackets is optional.  Thus,
[OPTIONAL-ARG] means that OPTIONAL-ARG is optional.  An argument
followed by an ellipsis is optional and may be repeated more than once.
Thus, REPEATED-ARGS... stands for zero or more arguments.  Parentheses
are used when several arguments are grouped into additional levels of
list structure in Lisp.

   Here is the `@defspec' line of an example of an imaginary special
form:

      - Special Form: foobar (VAR [FROM TO [INC]]) BODY...

In this example, the arguments FROM and TO are optional, but must both
be present or both absent.  If they are present, INC may optionally be
specified as well.  These arguments are grouped with the argument VAR
into a list, to distinguish them from BODY, which includes all
remaining elements of the form.

   In a Texinfo source file, this `@defspec' line is written like this
(except it would not be split over two lines, as it is in this example).

     @defspec foobar (@var{var} [@var{from} @var{to}
          [@var{inc}]]) @var{body}@dots{}

The function is listed in the Command and Variable Index under `foobar'.


File: texi.info,  Node: deffnx,  Next: Def Cmds in Detail,  Prev: Optional Arguments,  Up: Definition Commands

Two or More `First' Lines
=========================

   To create two or more `first' or header lines for a definition,
follow the first `@deffn' line by a line beginning with `@deffnx'.  The
`@deffnx' command works exactly like `@deffn' except that it does not
generate extra vertical white space between it and the preceding line.

   For example,

     @deffn {Interactive Command} isearch-forward
     @deffnx {Interactive Command} isearch-backward
     These two search commands are similar except ...
     @end deffn

produces

 - Interactive Command: isearch-forward
 - Interactive Command: isearch-backward
     These two search commands are similar except ...

   Each of the other definition commands has an `x' form: `@defunx',
`@defvrx', `@deftypefunx', etc.

   The `x' forms work just like `@itemx'; see *Note `@itemx': itemx.


File: texi.info,  Node: Def Cmds in Detail,  Next: Def Cmd Conventions,  Prev: deffnx,  Up: Definition Commands

The Definition Commands
=======================

   Texinfo provides more than a dozen definition commands, all of which
are described in this section.

   The definition commands automatically enter the name of the entity in
the appropriate index: for example, `@deffn', `@defun', and `@defmac'
enter function names in the index of functions; `@defvr' and `@defvar'
enter variable names in the index of variables.

   Although the examples that follow mostly illustrate Lisp, the
commands can be used for other programming languages.

* Menu:

* Functions Commands::          Commands for functions and similar entities.
* Variables Commands::          Commands for variables and similar entities.
* Typed Functions::             Commands for functions in typed languages.
* Typed Variables::             Commands for variables in typed languages.
* Abstract Objects::            Commands for object-oriented programming.
* Data Types::                  The definition command for data types.


File: texi.info,  Node: Functions Commands,  Next: Variables Commands,  Up: Def Cmds in Detail

Functions and Similar Entities
------------------------------

   This section describes the commands for describing functions and
similar entities:

`@deffn CATEGORY NAME ARGUMENTS...'
     The `@deffn' command is the general definition command for
     functions, interactive commands, and similar entities that may take
     arguments.  You must choose a term to describe the category of
     entity being defined; for example, "Function" could be used if the
     entity is a function.  The `@deffn' command is written at the
     beginning of a line and is followed on the same line by the
     category of entity being described, the name of this particular
     entity, and its arguments, if any.  Terminate the definition with
     `@end deffn' on a line of its own.

     For example, here is a definition:

          @deffn Command forward-char nchars
          Move point forward @var{nchars} characters.
          @end deffn

     This shows a rather terse definition for a "command" named
     `forward-char' with one argument, NCHARS.

     `@deffn' prints argument names such as NCHARS in italics or upper
     case, as if `@var' had been used, because we think of these names
     as metasyntactic variables--they stand for the actual argument
     values.  Within the text of the description, write an argument name
     explicitly with `@var' to refer to the value of the argument.  In
     the example above, we used `@var{nchars}' in this way.

     The template for `@deffn' is:

          @deffn CATEGORY NAME ARGUMENTS...
          BODY-OF-DEFINITION
          @end deffn

`@defun NAME ARGUMENTS...'
     The `@defun' command is the definition command for functions.
     `@defun' is equivalent to `@deffn Function ...'.

     For example,

          @defun set symbol new-value
          Change the value of the symbol @var{symbol}
          to @var{new-value}.
          @end defun

     shows a rather terse definition for a function `set' whose
     arguments are SYMBOL and NEW-VALUE.  The argument names on the
     `@defun' line automatically appear in italics or upper case as if
     they were enclosed in `@var'.  Terminate the definition with `@end
     defun' on a line of its own.

     The template is:

          @defun FUNCTION-NAME ARGUMENTS...
          BODY-OF-DEFINITION
          @end defun

     `@defun' creates an entry in the index of functions.

`@defmac NAME ARGUMENTS...'
     The `@defmac' command is the definition command for macros.
     `@defmac' is equivalent to `@deffn Macro ...' and works like
     `@defun'.

`@defspec NAME ARGUMENTS...'
     The `@defspec' command is the definition command for special
     forms.  (In Lisp, a special form is an entity much like a
     function.) `@defspec' is equivalent to `@deffn {Special Form} ...'
     and works like `@defun'.


File: texi.info,  Node: Variables Commands,  Next: Typed Functions,  Prev: Functions Commands,  Up: Def Cmds in Detail

Variables and Similar Entities
------------------------------

   Here are the commands for defining variables and similar entities:

`@defvr CATEGORY NAME'
     The `@defvr' command is a general definition command for something
     like a variable--an entity that records a value.  You must choose
     a term to describe the category of entity being defined; for
     example, "Variable" could be used if the entity is a variable.
     Write the `@defvr' command at the beginning of a line and followed
     it on the same line by the category of the entity and the name of
     the entity.

     Capitalize the category name like a title.  If the name of the
     category contains spaces, as in the name `User Option', write
     braces around it.  Otherwise, the second word will be mistaken for
     the name of the entity, for example:

          @defvr {User Option} fill-column
          This buffer-local variable specifies
          the maximum width of filled lines.
          ...
          @end defvr

     Terminate the definition with `@end defvr' on a line of its own.

     The template is:

          @defvr CATEGORY NAME
          BODY-OF-DEFINITION
          @end defvr

     `@defvr' creates an entry in the index of variables for NAME.

`@defvar NAME'
     The `@defvar' command is the definition command for variables.
     `@defvar' is equivalent to `@defvr Variable ...'.

     For example:

          @defvar kill-ring
          ...
          @end defvar

     The template is:

          @defvar NAME
          BODY-OF-DEFINITION
          @end defvar

     `@defvar' creates an entry in the index of variables for NAME.

`@defopt NAME'
     The `@defopt' command is the definition command for user options.
     `@defopt' is equivalent to `@defvr {User Option} ...' and works
     like `@defvar'.


File: texi.info,  Node: Typed Functions,  Next: Typed Variables,  Prev: Variables Commands,  Up: Def Cmds in Detail

Functions in Typed Languages
----------------------------

   The `@deftypefn' command and its variations are for describing
functions in C or any other language in which you must declare types of
variables and functions.

`@deftypefn CATEGORY DATA-TYPE NAME ARGUMENTS...'
     The `@deftypefn' command is the general definition command for
     functions and similar entities that may take arguments and that are
     typed.  The `@deftypefn' command is written at the beginning of a
     line and is followed on the same line by the category of entity
     being described, the type of the returned value, the name of this
     particular entity, and its arguments, if any.

     For example,

          @deftypefn {Library Function} int foobar
             (int @var{foo}, float @var{bar})
          ...
          @end deftypefn

     (where the text before the "...", shown above as two lines, would
     actually be a single line in a real Texinfo file) produces the
     following in Info:

          -- Library Function: int foobar (int FOO, float BAR)
          ...

     This means that `foobar' is a "library function" that returns an
     `int', and its arguments are FOO (an `int') and BAR (a `float').

     The argument names that you write in `@deftypefn' are not subject
     to an implicit `@var'--since the actual names of the arguments in
     `@deftypefn' are typically scattered among data type names and
     keywords, Texinfo cannot find them without help.  Instead, you
     must write `@var' explicitly around the argument names.  In the
     example above, the argument names are `foo' and `bar'.

     The template for `@deftypefn' is:

          @deftypefn CATEGORY DATA-TYPE NAME ARGUMENTS ...
          BODY-OF-DESCRIPTION
          @end deftypefn

     Note that if the CATEGORY or DATA TYPE is more than one word then
     it must be enclosed in braces to make it a single argument.

     If you are describing a procedure in a language that has packages,
     such as Ada, you might consider using `@deftypefn' in a manner
     somewhat contrary to the convention described in the preceding
     paragraphs.

     For example:

          @deftypefn stacks private push
                  (@var{s}:in out stack;
                  @var{n}:in integer)
          ...
          @end deftypefn

     (The `@deftypefn' arguments are shown split into three lines, but
     would be a single line in a real Texinfo file.)

     In this instance, the procedure is classified as belonging to the
     package `stacks' rather than classified as a `procedure' and its
     data type is described as `private'.  (The name of the procedure
     is `push', and its arguments are S and N.)

     `@deftypefn' creates an entry in the index of functions for NAME.

`@deftypefun DATA-TYPE NAME ARGUMENTS...'
     The `@deftypefun' command is the specialized definition command
     for functions in typed languages.  The command is equivalent to
     `@deftypefn Function ...'.

     Thus,

          @deftypefun int foobar (int @var{foo}, float @var{bar})
          ...
          @end deftypefun

     produces the following in Info:

          -- Function: int foobar (int FOO, float BAR)
          ...

     The template is:

          @deftypefun TYPE NAME ARGUMENTS...
          BODY-OF-DESCRIPTION
          @end deftypefun

     `@deftypefun' creates an entry in the index of functions for NAME.


File: texi.info,  Node: Typed Variables,  Next: Abstract Objects,  Prev: Typed Functions,  Up: Def Cmds in Detail

Variables in Typed Languages
----------------------------

   Variables in typed languages are handled in a manner similar to
functions in typed languages.  *Note Typed Functions::.  The general
definition command `@deftypevr' corresponds to `@deftypefn' and the
specialized definition command `@deftypevar' corresponds to
`@deftypefun'.

`@deftypevr CATEGORY DATA-TYPE NAME'
     The `@deftypevr' command is the general definition command for
     something like a variable in a typed language--an entity that
     records a value.  You must choose a term to describe the category
     of the entity being defined; for example, "Variable" could be used
     if the entity is a variable.

     The `@deftypevr' command is written at the beginning of a line and
     is followed on the same line by the category of the entity being
     described, the data type, and the name of this particular entity.

     For example:

          @deftypevr {Global Flag} int enable
          ...
          @end deftypevr

     produces the following in Info:

          -- Global Flag: int enable
          ...

     The template is:

          @deftypevr CATEGORY DATA-TYPE NAME
          BODY-OF-DESCRIPTION
          @end deftypevr

     `@deftypevr' creates an entry in the index of variables for NAME.

`@deftypevar DATA-TYPE NAME'
     The `@deftypevar' command is the specialized definition command
     for variables in typed languages.  `@deftypevar' is equivalent to
     `@deftypevr Variable ...'.

     For example:

          @deftypevar int fubar
          ...
          @end deftypevar

     produces the following in Info:

          -- Variable: int fubar
          ...

     The template is:

          @deftypevar DATA-TYPE NAME
          BODY-OF-DESCRIPTION
          @end deftypevar

     `@deftypevar' creates an entry in the index of variables for NAME.


File: texi.info,  Node: Abstract Objects,  Next: Data Types,  Prev: Typed Variables,  Up: Def Cmds in Detail

Object-Oriented Programming
---------------------------

   Here are the commands for formatting descriptions about abstract
objects, such as are used in object-oriented programming.  A class is a
defined type of abstract object.  An instance of a class is a
particular object that has the type of the class.  An instance variable
is a variable that belongs to the class but for which each instance has
its own value.

   In a definition, if the name of a class is truly a name defined in
the programming system for a class, then you should write an `@code'
around it.  Otherwise, it is printed in the usual text font.

`@defcv CATEGORY CLASS NAME'
     The `@defcv' command is the general definition command for
     variables associated with classes in object-oriented programming.
     The `@defcv' command is followed by three arguments: the category
     of thing being defined, the class to which it belongs, and its
     name.  Thus,

          @defcv {Class Option} Window border-pattern
          ...
          @end defcv

     illustrates how you would write the first line of a definition of
     the `border-pattern' class option of the class `Window'.

     The template is

          @defcv CATEGORY CLASS NAME
          ...
          @end defcv

     `@defcv' creates an entry in the index of variables.

`@defivar CLASS NAME'
     The `@defivar' command is the definition command for instance
     variables in object-oriented programming.  `@defivar' is
     equivalent to `@defcv {Instance Variable} ...'

     The template is:

          @defivar CLASS INSTANCE-VARIABLE-NAME
          BODY-OF-DEFINITION
          @end defivar

     `@defivar' creates an entry in the index of variables.

`@defop CATEGORY CLASS NAME ARGUMENTS...'
     The `@defop' command is the general definition command for
     entities that may resemble methods in object-oriented programming.
     These entities take arguments, as functions do, but are associated
     with particular classes of objects.

     For example, some systems have constructs called "wrappers" that
     are associated with classes as methods are, but that act more like
     macros than like functions.  You could use `@defop Wrapper' to
     describe one of these.

     Sometimes it is useful to distinguish methods and "operations".
     You can think of an operation as the specification for a method.
     Thus, a window system might specify that all window classes have a
     method named `expose'; we would say that this window system
     defines an `expose' operation on windows in general.  Typically,
     the operation has a name and also specifies the pattern of
     arguments; all methods that implement the operation must accept
     the same arguments, since applications that use the operation do
     so without knowing which method will implement it.

     Often it makes more sense to document operations than methods.  For
     example, window application developers need to know about the
     `expose' operation, but need not be concerned with whether a given
     class of windows has its own method to implement this operation.
     To describe this operation, you would write:

          @defop Operation windows expose

     The `@defop' command is written at the beginning of a line and is
     followed on the same line by the overall name of the category of
     operation, the name of the class of the operation, the name of the
     operation, and its arguments, if any.

     The template is:

          @defop CATEGORY CLASS NAME ARGUMENTS...
          BODY-OF-DEFINITION
          @end defop

     `@defop' creates an entry, such as ``expose' on `windows'', in the
     index of functions.

`@defmethod CLASS NAME ARGUMENTS...'
     The `@defmethod' command is the definition command for methods in
     object-oriented programming.  A method is a kind of function that
     implements an operation for a particular class of objects and its
     subclasses.  In the Lisp Machine, methods actually were functions,
     but they were usually defined with `defmethod'.

     `@defmethod' is equivalent to `@defop Method ...'.  The command is
     written at the beginning of a line and is followed by the name of
     the class of the method, the name of the method, and its
     arguments, if any.

     For example,

          @defmethod `bar-class' bar-method argument
          ...
          @end defmethod

     illustrates the definition for a method called `bar-method' of the
     class `bar-class'.  The method takes an argument.

     The template is:

          @defmethod CLASS METHOD-NAME ARGUMENTS...
          BODY-OF-DEFINITION
          @end defmethod

     `@defmethod' creates an entry in the index of functions, such as
     ``bar-method' on `bar-class''.


File: texi.info,  Node: Data Types,  Prev: Abstract Objects,  Up: Def Cmds in Detail

Data Types
----------

   Here is the command for data types:

`@deftp CATEGORY NAME ATTRIBUTES...'
     The `@deftp' command is the generic definition command for data
     types.  The command is written at the beginning of a line and is
     followed on the same line by the category, by the name of the type
     (which is a word like `int' or `float'), and then by names of
     attributes of objects of that type.  Thus, you could use this
     command for describing `int' or `float', in which case you could
     use `data type' as the category.  (A data type is a category of
     certain objects for purposes of deciding which operations can be
     performed on them.)

     In Lisp, for example,  "pair" names a particular data type, and an
     object of that type has two slots called the CAR and the CDR.
     Here is how you would write the first line of a definition of
     `pair'.

          @deftp {Data type} pair car cdr
          ...
          @end deftp

     The template is:

          @deftp CATEGORY NAME-OF-TYPE ATTRIBUTES...
          BODY-OF-DEFINITION
          @end deftp

     `@deftp' creates an entry in the index of data types.


File: texi.info,  Node: Def Cmd Conventions,  Next: Sample Function Definition,  Prev: Def Cmds in Detail,  Up: Definition Commands

Conventions for Writing Definitions
===================================

   When you write a definition using `@deffn', `@defun', or one of the
other definition commands, please take care to use arguments that
indicate the meaning, as with the COUNT argument to the `forward-word'
function.  Also, if the name of an argument contains the name of a
type, such as INTEGER, take care that the argument actually is of that
type.


File: texi.info,  Node: Sample Function Definition,  Prev: Def Cmd Conventions,  Up: Definition Commands

A Sample Function Definition
============================

   A function definition uses the `@defun' and `@end defun' commands.
The name of the function follows immediately after the `@defun' command
and it is followed, on the same line, by the parameter list.

   Here is a definition from `The GNU Emacs Lisp Reference Manual'.
(*Note Calling Functions: (elisp)Calling Functions.)

      - Function: apply FUNCTION &rest ARGUMENTS
          `apply' calls FUNCTION with ARGUMENTS, just like `funcall'
          but with one difference: the last of ARGUMENTS is a list of
          arguments to give to FUNCTION, rather than a single argument.
          We also say that this list is "appended" to the other
          arguments.

          `apply' returns the result of calling FUNCTION.  As with
          `funcall', FUNCTION must either be a Lisp function or a
          primitive function; special forms and macros do not make
          sense in `apply'.

               (setq f 'list)
                    => list
               (apply f 'x 'y 'z)
               error--> Wrong type argument: listp, z
               (apply '+ 1 2 '(3 4))
                    => 10
               (apply '+ '(1 2 3 4))
                    => 10
               
               (apply 'append '((a b c) nil (x y z) nil))
                    => (a b c x y z)

          An interesting example of using `apply' is found in the
          description of `mapcar'.

   In the Texinfo source file, this example looks like this:

     @defun apply function &rest arguments
     
     @code{apply} calls @var{function} with
     @var{arguments}, just like @code{funcall} but with one
     difference: the last of @var{arguments} is a list of
     arguments to give to @var{function}, rather than a single
     argument.  We also say that this list is @dfn{appended}
     to the other arguments.
     
     @code{apply} returns the result of calling
     @var{function}.  As with @code{funcall},
     @var{function} must either be a Lisp function or a
     primitive function; special forms and macros do not make
     sense in @code{apply}.
     
     @example
     (setq f 'list)
          @result{} list
     (apply f 'x 'y 'z)
     @error{} Wrong type argument: listp, z
     (apply '+ 1 2 '(3 4))
          @result{} 10
     (apply '+ '(1 2 3 4))
          @result{} 10
     
     (apply 'append '((a b c) nil (x y z) nil))
          @result{} (a b c x y z)
     @end example
     
     An interesting example of using @code{apply} is found
     in the description of @code{mapcar}.@refill
     @end defun

In this manual, this function is listed in the Command and Variable
Index under `apply'.

   Ordinary variables and user options are described using a format like
that for functions except that variables do not take arguments.

OpenPOWER on IntegriCloud