| 12
 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
 1462
 1463
 1464
 1465
 1466
 1467
 1468
 1469
 1470
 1471
 1472
 1473
 1474
 1475
 1476
 1477
 1478
 1479
 1480
 1481
 1482
 1483
 1484
 1485
 1486
 1487
 1488
 1489
 1490
 1491
 1492
 1493
 1494
 1495
 1496
 1497
 1498
 1499
 1500
 1501
 1502
 1503
 1504
 1505
 1506
 1507
 1508
 1509
 1510
 1511
 1512
 1513
 1514
 1515
 1516
 1517
 1518
 1519
 1520
 1521
 1522
 1523
 1524
 1525
 1526
 1527
 1528
 1529
 1530
 1531
 1532
 1533
 1534
 1535
 1536
 1537
 1538
 1539
 1540
 1541
 1542
 1543
 1544
 1545
 1546
 1547
 1548
 1549
 1550
 1551
 1552
 1553
 1554
 1555
 1556
 1557
 1558
 1559
 1560
 1561
 1562
 1563
 1564
 1565
 1566
 1567
 1568
 1569
 1570
 1571
 1572
 1573
 1574
 1575
 1576
 1577
 1578
 1579
 1580
 1581
 1582
 1583
 1584
 1585
 1586
 1587
 1588
 1589
 1590
 1591
 1592
 1593
 1594
 1595
 1596
 1597
 1598
 1599
 1600
 1601
 1602
 1603
 1604
 1605
 1606
 1607
 1608
 1609
 1610
 1611
 1612
 1613
 1614
 1615
 1616
 1617
 1618
 1619
 1620
 1621
 1622
 1623
 1624
 1625
 1626
 1627
 1628
 1629
 1630
 1631
 1632
 1633
 1634
 1635
 1636
 1637
 1638
 1639
 1640
 1641
 1642
 1643
 1644
 1645
 1646
 1647
 1648
 1649
 1650
 1651
 1652
 1653
 1654
 1655
 1656
 1657
 1658
 1659
 1660
 1661
 1662
 1663
 1664
 1665
 1666
 1667
 1668
 1669
 1670
 1671
 1672
 1673
 1674
 1675
 1676
 1677
 1678
 1679
 1680
 1681
 1682
 1683
 1684
 1685
 1686
 1687
 1688
 1689
 1690
 1691
 1692
 1693
 1694
 1695
 1696
 1697
 1698
 1699
 1700
 1701
 1702
 1703
 1704
 1705
 1706
 1707
 1708
 1709
 1710
 1711
 1712
 1713
 1714
 1715
 1716
 1717
 1718
 1719
 1720
 1721
 1722
 1723
 1724
 1725
 1726
 1727
 1728
 1729
 1730
 1731
 1732
 1733
 1734
 1735
 1736
 1737
 1738
 1739
 1740
 1741
 1742
 1743
 1744
 1745
 1746
 1747
 1748
 1749
 1750
 1751
 1752
 1753
 1754
 1755
 1756
 1757
 1758
 1759
 1760
 1761
 1762
 1763
 1764
 1765
 1766
 1767
 1768
 1769
 1770
 1771
 1772
 1773
 1774
 1775
 1776
 1777
 1778
 1779
 1780
 1781
 1782
 1783
 1784
 1785
 1786
 1787
 1788
 1789
 1790
 1791
 1792
 1793
 1794
 1795
 1796
 1797
 1798
 1799
 1800
 1801
 1802
 1803
 1804
 1805
 1806
 1807
 1808
 1809
 1810
 1811
 1812
 1813
 1814
 1815
 1816
 1817
 1818
 1819
 1820
 1821
 1822
 1823
 1824
 1825
 1826
 1827
 1828
 1829
 1830
 1831
 1832
 1833
 1834
 1835
 1836
 1837
 1838
 1839
 1840
 1841
 1842
 1843
 1844
 1845
 1846
 1847
 1848
 1849
 1850
 1851
 1852
 1853
 1854
 1855
 1856
 1857
 1858
 1859
 1860
 1861
 1862
 1863
 1864
 1865
 1866
 1867
 1868
 1869
 1870
 1871
 1872
 1873
 1874
 1875
 1876
 1877
 1878
 1879
 1880
 1881
 1882
 1883
 1884
 1885
 1886
 1887
 1888
 1889
 1890
 1891
 1892
 1893
 1894
 1895
 1896
 1897
 1898
 1899
 1900
 1901
 1902
 1903
 1904
 1905
 1906
 1907
 1908
 1909
 1910
 1911
 1912
 1913
 1914
 1915
 1916
 1917
 1918
 1919
 1920
 1921
 1922
 1923
 1924
 1925
 1926
 1927
 1928
 1929
 1930
 1931
 1932
 1933
 1934
 1935
 1936
 1937
 1938
 1939
 1940
 1941
 1942
 1943
 1944
 1945
 1946
 1947
 1948
 1949
 1950
 1951
 1952
 1953
 1954
 1955
 1956
 1957
 1958
 1959
 1960
 1961
 1962
 1963
 1964
 1965
 1966
 1967
 1968
 1969
 1970
 1971
 1972
 1973
 1974
 1975
 1976
 1977
 1978
 1979
 1980
 1981
 1982
 1983
 1984
 1985
 1986
 1987
 1988
 1989
 1990
 1991
 1992
 1993
 1994
 1995
 1996
 1997
 1998
 1999
 2000
 2001
 2002
 2003
 2004
 2005
 2006
 2007
 2008
 2009
 2010
 2011
 2012
 2013
 2014
 2015
 2016
 2017
 2018
 2019
 2020
 2021
 2022
 2023
 2024
 2025
 2026
 2027
 2028
 2029
 2030
 2031
 2032
 2033
 2034
 2035
 2036
 2037
 2038
 2039
 2040
 2041
 2042
 2043
 2044
 2045
 2046
 2047
 2048
 2049
 2050
 2051
 2052
 2053
 2054
 2055
 2056
 2057
 2058
 2059
 2060
 2061
 2062
 2063
 2064
 2065
 2066
 2067
 2068
 2069
 2070
 2071
 2072
 2073
 2074
 2075
 2076
 2077
 2078
 2079
 2080
 2081
 2082
 2083
 2084
 2085
 2086
 2087
 2088
 2089
 2090
 2091
 2092
 2093
 2094
 2095
 2096
 2097
 2098
 2099
 2100
 2101
 2102
 2103
 2104
 2105
 2106
 2107
 2108
 2109
 2110
 2111
 2112
 2113
 2114
 2115
 2116
 2117
 2118
 2119
 2120
 2121
 2122
 2123
 2124
 2125
 2126
 2127
 2128
 2129
 2130
 2131
 2132
 2133
 2134
 2135
 2136
 2137
 2138
 2139
 2140
 2141
 2142
 2143
 2144
 2145
 2146
 2147
 2148
 2149
 2150
 2151
 2152
 2153
 2154
 2155
 2156
 2157
 2158
 2159
 2160
 2161
 2162
 2163
 2164
 2165
 2166
 2167
 2168
 2169
 2170
 2171
 2172
 2173
 2174
 2175
 2176
 2177
 2178
 2179
 2180
 2181
 2182
 2183
 2184
 2185
 2186
 2187
 2188
 2189
 2190
 2191
 2192
 2193
 2194
 2195
 2196
 2197
 2198
 2199
 2200
 2201
 2202
 2203
 2204
 2205
 2206
 2207
 2208
 2209
 2210
 2211
 2212
 2213
 2214
 2215
 2216
 2217
 2218
 2219
 2220
 2221
 2222
 2223
 2224
 2225
 2226
 2227
 2228
 2229
 2230
 2231
 2232
 2233
 2234
 2235
 2236
 2237
 2238
 2239
 2240
 2241
 2242
 2243
 2244
 2245
 2246
 2247
 2248
 2249
 2250
 2251
 2252
 2253
 2254
 2255
 2256
 2257
 2258
 2259
 2260
 2261
 2262
 2263
 2264
 2265
 2266
 2267
 2268
 2269
 2270
 2271
 2272
 2273
 2274
 2275
 2276
 2277
 2278
 2279
 2280
 2281
 2282
 2283
 2284
 2285
 2286
 2287
 2288
 2289
 2290
 2291
 2292
 2293
 2294
 2295
 2296
 2297
 2298
 2299
 2300
 2301
 2302
 2303
 2304
 2305
 2306
 2307
 2308
 2309
 2310
 2311
 2312
 2313
 2314
 2315
 2316
 2317
 2318
 2319
 2320
 2321
 2322
 2323
 2324
 2325
 2326
 2327
 2328
 2329
 2330
 2331
 2332
 2333
 2334
 2335
 2336
 2337
 2338
 2339
 2340
 2341
 2342
 2343
 2344
 2345
 2346
 2347
 2348
 2349
 2350
 2351
 2352
 2353
 2354
 2355
 2356
 2357
 2358
 2359
 2360
 2361
 2362
 2363
 2364
 2365
 2366
 2367
 2368
 2369
 2370
 2371
 2372
 2373
 2374
 2375
 2376
 2377
 2378
 2379
 2380
 2381
 2382
 2383
 2384
 2385
 2386
 2387
 2388
 2389
 2390
 2391
 2392
 2393
 2394
 2395
 2396
 2397
 2398
 2399
 2400
 2401
 2402
 2403
 2404
 2405
 2406
 2407
 2408
 2409
 2410
 2411
 2412
 2413
 2414
 2415
 2416
 2417
 2418
 2419
 2420
 2421
 2422
 2423
 2424
 2425
 2426
 2427
 2428
 2429
 2430
 2431
 2432
 2433
 2434
 2435
 2436
 2437
 2438
 2439
 2440
 2441
 2442
 2443
 2444
 2445
 2446
 2447
 2448
 2449
 2450
 2451
 2452
 2453
 2454
 2455
 2456
 2457
 2458
 2459
 2460
 2461
 2462
 2463
 2464
 2465
 2466
 2467
 2468
 2469
 2470
 2471
 2472
 2473
 2474
 2475
 2476
 2477
 2478
 2479
 2480
 2481
 2482
 2483
 2484
 2485
 2486
 2487
 2488
 2489
 2490
 2491
 2492
 2493
 2494
 2495
 2496
 2497
 2498
 2499
 2500
 2501
 2502
 2503
 2504
 2505
 2506
 2507
 2508
 2509
 2510
 2511
 2512
 2513
 2514
 2515
 2516
 2517
 2518
 2519
 2520
 2521
 2522
 2523
 2524
 2525
 2526
 2527
 2528
 2529
 2530
 2531
 2532
 2533
 2534
 2535
 2536
 2537
 2538
 2539
 2540
 2541
 2542
 2543
 2544
 2545
 2546
 2547
 2548
 2549
 2550
 2551
 2552
 2553
 2554
 2555
 2556
 2557
 2558
 2559
 2560
 2561
 2562
 2563
 2564
 2565
 2566
 2567
 2568
 2569
 2570
 2571
 2572
 2573
 2574
 2575
 2576
 2577
 2578
 2579
 2580
 2581
 2582
 2583
 2584
 2585
 2586
 2587
 2588
 2589
 2590
 2591
 2592
 2593
 2594
 2595
 2596
 2597
 2598
 2599
 2600
 2601
 2602
 2603
 2604
 2605
 2606
 2607
 2608
 2609
 2610
 2611
 2612
 2613
 2614
 2615
 2616
 2617
 2618
 2619
 2620
 2621
 2622
 2623
 2624
 2625
 2626
 2627
 2628
 2629
 2630
 2631
 2632
 2633
 2634
 2635
 2636
 2637
 2638
 2639
 2640
 2641
 2642
 2643
 2644
 2645
 2646
 2647
 2648
 2649
 2650
 2651
 2652
 2653
 2654
 2655
 2656
 2657
 2658
 2659
 2660
 2661
 2662
 2663
 2664
 2665
 2666
 2667
 2668
 2669
 2670
 2671
 2672
 2673
 2674
 2675
 2676
 2677
 2678
 2679
 2680
 2681
 2682
 2683
 2684
 2685
 2686
 2687
 2688
 2689
 2690
 2691
 2692
 2693
 2694
 2695
 2696
 2697
 2698
 2699
 2700
 2701
 2702
 2703
 2704
 2705
 2706
 2707
 2708
 2709
 2710
 2711
 2712
 2713
 2714
 2715
 2716
 2717
 2718
 2719
 2720
 2721
 2722
 2723
 2724
 2725
 2726
 2727
 2728
 2729
 2730
 2731
 2732
 2733
 2734
 2735
 2736
 2737
 2738
 2739
 2740
 2741
 2742
 2743
 2744
 2745
 2746
 2747
 2748
 2749
 2750
 2751
 2752
 2753
 2754
 2755
 2756
 2757
 2758
 2759
 2760
 2761
 2762
 2763
 2764
 2765
 2766
 2767
 2768
 2769
 2770
 2771
 2772
 2773
 2774
 2775
 2776
 2777
 2778
 2779
 2780
 2781
 2782
 2783
 2784
 2785
 2786
 2787
 2788
 2789
 2790
 2791
 2792
 2793
 2794
 2795
 2796
 2797
 2798
 2799
 2800
 2801
 2802
 2803
 2804
 2805
 2806
 2807
 2808
 2809
 2810
 2811
 2812
 2813
 2814
 2815
 2816
 2817
 2818
 2819
 2820
 2821
 2822
 2823
 2824
 2825
 2826
 2827
 2828
 2829
 2830
 
 | @c -*-texinfo-*-
@c This is part of the GNU Emacs Lisp Reference Manual.
@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998 Free Software Foundation, Inc. 
@c See the file elisp.texi for copying conditions.
@setfilename ../info/objects
@node Lisp Data Types, Numbers, Introduction, Top
@c @chapter Lisp Data Types
@chapter Lisp$B$N%G!<%?7?(B
@c @cindex object
@c @cindex Lisp object
@c @cindex type
@c @cindex data type
@cindex $B%*%V%8%'%/%H(B
@cindex Lisp$B%*%V%8%'%/%H(B
@cindex $B7?(B
@cindex $B%G!<%?7?(B
@c   A Lisp @dfn{object} is a piece of data used and manipulated by Lisp
@c programs.  For our purposes, a @dfn{type} or @dfn{data type} is a set of
@c possible objects.
Lisp@dfn{$B%*%V%8%'%/%H(B}$B!J(Bobject$B!K$H$O!"(B
Lisp$B%W%m%0%i%`$,;HMQ$7A`:n$9$k%G!<%?$N$3$H$G$9!#(B
@dfn{$B7?(B}$B!J(Btype$B!K$d(B@dfn{$B%G!<%?7?(B}$B!J(Bdata type$B!K$H$O!"$3$3$G$O!"(B
$B2DG=$J%*%V%8%'%/%H$N=89g$r0UL#$7$^$9!#(B
@c   Every object belongs to at least one type.  Objects of the same type
@c have similar structures and may usually be used in the same contexts.
@c Types can overlap, and objects can belong to two or more types.
@c Consequently, we can ask whether an object belongs to a particular type,
@c but not for ``the'' type of an object.
$B3F%*%V%8%'%/%H$O!">/$J$/$H$b!"(B1$B$D$N7?$KB0$7$^$9!#(B
$BF1$87?$N%*%V%8%'%/%H$O!"9=B$$KN`;w@-$,$"$j!"IaDL!"F1$8J8L.$G;H$o$l$^$9!#(B
$B7?$O8_$$$K=EJ#$7$F$$$F$b$h$/!"%*%V%8%'%/%H$OJ#?t$N7?$KB0$9$k$3$H$,$G$-$^$9!#(B
$B$=$N$?$a!"%*%V%8%'%/%H$,FCDj$N7?$KB0$9$k$+$I$&$+$OH=CG$G$-$^$9$,!"(B
$B%*%V%8%'%/%H$N7?$r!X(B1$B$D!Y$K8BDj$9$k$3$H$O$G$-$^$;$s!#(B
@c @cindex primitive type
@cindex $B4pK\7?(B
@c   A few fundamental object types are built into Emacs.  These, from
@c which all other types are constructed, are called @dfn{primitive
@c types}.  Each object belongs to one and only one primitive type.  These
@c types include @dfn{integer}, @dfn{float}, @dfn{cons}, @dfn{symbol},
@c @dfn{string}, @dfn{vector}, @dfn{subr}, @dfn{byte-code function}, plus
@c several special types, such as @dfn{buffer}, that are related to
@c editing.  (@xref{Editing Types}.)
Emacs$B$K$O>/?t$N4pK\%*%V%8%'%/%H7?$rAH$_9~$s$G$"$j$^$9!#(B
$B$3$l$i$N7?$OB>$N$9$Y$F$N%*%V%8%'%/%H7?$r9=@.$9$k$b$H$G$"$j!"(B
@dfn{$B4pK\7?(B}$B!J(Bprimitive types$B!K$H8F$S$^$9!#(B
$B3F%*%V%8%'%/%H$O$?$C$?(B1$B$D$N4pK\7?$KB0$7$^$9!#(B
$B4pK\7?$K$O!"(B
@dfn{$B@0?t(B}$B!J(Binteger$B!K!"(B@dfn{$BIbF0>.?tE@?t(B}$B!J(Bfloat$B!K!"(B
@dfn{$B%3%s%9(B}$B!J(Bcons$B!K!"(B@dfn{$B%7%s%\%k(B}$B!J(Bsymbol$B!K!"(B
@dfn{$BJ8;zNs(B}$B!J(Bstring$B!K!"(B@dfn{$B%Y%/%H%k(B}$B!J(Bvector$B!K!"(B@dfn{subr}$B!"(B
@dfn{$B%P%$%H%3!<%I4X?t(B}$B!J(Bbyte-code function$B!K!"(B
$B$J$i$S$K!"JT=8$K4XO"$9$k(B@dfn{$B%P%C%U%!(B}$B!J(Bbuffer$B!K$J$I$N(B
$BFCJL$J7?$,$"$j$^$9!#(B
$B!J(B@pxref{Editing Types}$B!#!K(B
@c   Each primitive type has a corresponding Lisp function that checks
@c whether an object is a member of that type.
$B3F4pK\7?$K$O!"$=$N7?$KB0$9$k%*%V%8%'%/%H$G$"$k$+$I$&$+$r8!::$9$k(B
$BBP1~$9$k(BLisp$B4X?t$,$"$j$^$9!#(B
@c   Note that Lisp is unlike many other languages in that Lisp objects are
@c @dfn{self-typing}: the primitive type of the object is implicit in the
@c object itself.  For example, if an object is a vector, nothing can treat
@c it as a number; Lisp knows it is a vector, not a number.
Lisp$B%*%V%8%'%/%H$O(B@dfn{$B7?$r<+8J5-=R(B}$B!J(Bself-typing$B!K$9$k$H$$$&E@$G!"(B
Lisp$B$OB>$NB?$/$N8@8l$H$O0[$J$j$^$9!#(B
$B$D$^$j!"%*%V%8%'%/%H$N4pK\7?$O!"%*%V%8%'%/%H<+BN$K0E$K4^$^$l$F$$$^$9!#(B
$B$?$H$($P!"%*%V%8%'%/%H$,%Y%/%H%k$G$"$l$P!"$=$l$r?t$H07$&$3$H$O$"$j$^$;$s!#(B
Lisp$B$K$O!"%Y%/%H%k$O?t$G$O$J$$$H$o$+$C$F$$$k$N$G$9!#(B
@c   In most languages, the programmer must declare the data type of each
@c variable, and the type is known by the compiler but not represented in
@c the data.  Such type declarations do not exist in Emacs Lisp.  A Lisp
@c variable can have any type of value, and it remembers whatever value
@c you store in it, type and all.
$BB?$/$N8@8l$G$O!"%W%m%0%i%^$O3FJQ?t$N%G!<%?7?$r@k8@$9$kI,MW$,$"$j$^$9!#(B
$B7?$O%3%s%Q%$%i$,CN$C$F$$$k$N$G$"$C$F!"%G!<%?$NCf$K$OF~$C$F$$$^$;$s!#(B
$B$3$N$h$&$J7?@k8@$O(BEmacs Lisp$B$K$OB8:_$7$^$;$s!#(B
Lisp$BJQ?t$O$I$s$J7?$NCM$G$bJ];}$G$-!"(B
$BJQ?t$KF~$l$?CM$H7?$r5-O?$7$F$$$^$9!#(B
@c   This chapter describes the purpose, printed representation, and read
@c syntax of each of the standard types in GNU Emacs Lisp.  Details on how
@c to use these types can be found in later chapters.
$BK\>O$G$O!"(BGNU Emacs Lisp$B$N3FI8=`7?$NI=<(I=8=$HF~NO9=J8$r@bL@$7$^$9!#(B
$B$3$l$i$N7?$N;HMQJ}K!$N>\:Y$O!"$"$H$N>O$K>y$j$^$9!#(B
@menu
* Printed Representation::      How Lisp objects are represented as text.
* Comments::                    Comments and their formatting conventions.
* Programming Types::           Types found in all Lisp systems.
* Editing Types::               Types specific to Emacs.
* Type Predicates::             Tests related to types.
* Equality Predicates::         Tests of equality between any two objects.
@end menu
@node Printed Representation
@comment  node-name,  next,  previous,  up
@c @section Printed Representation and Read Syntax
@section $BI=<(I=8=$HF~NO9=J8(B
@c @cindex printed representation
@c @cindex read syntax
@cindex $BI=<(I=8=(B
@cindex $BF~NO9=J8(B
@c   The @dfn{printed representation} of an object is the format of the
@c output generated by the Lisp printer (the function @code{prin1}) for
@c that object.  The @dfn{read syntax} of an object is the format of the
@c input accepted by the Lisp reader (the function @code{read}) for that
@c object.  @xref{Read and Print}.
$B%*%V%8%'%/%H$N(B@dfn{$BI=<(I=8=(B}$B!J(Bprinted representation$B!K$H$O!"(B
Lisp$B%W%j%s%?!J4X?t(B@code{prin1}$B!K$,$=$N%*%V%8%'%/%H$r=PNOI=<($9$k$H$-$N(B
$B=q<0$G$9!#(B
$B%*%V%8%'%/%H$N(B@dfn{$BF~NO9=J8(B}$B!J(Bread syntax$B!K$H$O!"(B
Lisp$B%j!<%@!J4X?t(B@code{read}$B!K$,$=$N%*%V%8%'%/%H$rF~NO$H$7$F<uM}$9$k=q<0$G$9!#(B
@xref{Read and Print}$B!#(B
@c   Most objects have more than one possible read syntax.  Some types of
@c object have no read syntax, since it may not make sense to enter objects
@c of these types directly in a Lisp program.  Except for these cases, the
@c printed representation of an object is also a read syntax for it.
$B$[$H$s$I$N%*%V%8%'%/%H$K$O(B1$B$D0J>e$N2DG=$JF~NO9=J8$,$"$j$^$9!#(B
$B$"$k<o$N7?$N%*%V%8%'%/%H$K$OF~NO9=J8$O$"$j$^$;$s$,!"(B
$B$=$N$h$&$J7?$N%*%V%8%'%/%H$r(BLisp$B%W%m%0%i%`$KD>@\F~NO$9$k0UL#$,$J$$$+$i$G$9!#(B
$B$3$N$h$&$J>l9g$r=|$/$H!"(B
$B%*%V%8%'%/%H$NI=<(I=8=$O$=$N%*%V%8%'%/%H$NF~NO9=J8$G$b$"$j$^$9!#(B
@c   In other languages, an expression is text; it has no other form.  In
@c Lisp, an expression is primarily a Lisp object and only secondarily the
@c text that is the object's read syntax.  Often there is no need to
@c emphasize this distinction, but you must keep it in the back of your
@c mind, or you will occasionally be very confused.
$BB>$N8@8l$G$O!"<0$O%F%-%9%H$G$"$C$F!"$3$l0J30$N7A$O$"$j$^$;$s!#(B
Lisp$B$G$O!"<0$O$H$K$+$/(BLisp$B%*%V%8%'%/%H$G$"$C$F!"(B
$B%*%V%8%'%/%H$NF~NO9=J8$G$"$k%F%-%9%H$OI{<!E*$J$b$N$G$9!#(B
$B$3$N0c$$$r6/D4$9$kI,MW$O$"$j$^$;$s$,!"(B
$B$3$N$3$H$r?4$KN1$a$F$*$+$J$$$H:.Mp$9$k$3$H$,$"$j$^$9!#(B
@c @cindex hash notation
@cindex $B%O%C%7%e5-K!(B
@c   Every type has a printed representation.  Some types have no read
@c syntax---for example, the buffer type has none.  Objects of these types
@c are printed in @dfn{hash notation}: the characters @samp{#<} followed by
@c a descriptive string (typically the type name followed by the name of
@c the object), and closed with a matching @samp{>}.  Hash notation cannot
@c be read at all, so the Lisp reader signals the error
@c @code{invalid-read-syntax} whenever it encounters @samp{#<}.
$B3F7?$K$OI=<(I=8=$,$"$j$^$9!#(B
$BF~NO9=J8$N$J$$7?$b$"$j$^$9!#(B
$B$?$H$($P!"%P%C%U%!7?$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$B$3$N$h$&$J7?$N%*%V%8%'%/%H$O(B@dfn{$B%O%C%7%e5-K!(B}$B!J(Bhash notation$B!K$GI=<($7$^$9!#(B
$B$D$^$j!"J8;zNs(B@samp{#<}$B$N$"$H$K@bL@MQ$NJ8;zNs(B
$B!JE57?E*$K$O7?L>$K%*%V%8%'%/%H$NL>A0$rB3$1$?$b$N!K$rB3$1!"(B
$BBP1~$9$k(B@samp{>}$B$GJD$8$^$9!#(B
$B%O%C%7%e5-K!$rFI$_<h$k$3$H$O$G$-$^$;$s$+$i!"(B
Lisp$B%j!<%@$,(B@samp{#<}$B$K=P2q$&$H%(%i!<(B@code{invalid-read-syntax}$B$r(B
$BDLCN$7$^$9!#(B
@kindex invalid-read-syntax
@example
(current-buffer)
     @result{} #<buffer objects.texi>
@end example
@c   When you evaluate an expression interactively, the Lisp interpreter
@c first reads the textual representation of it, producing a Lisp object,
@c and then evaluates that object (@pxref{Evaluation}).  However,
@c evaluation and reading are separate activities.  Reading returns the
@c Lisp object represented by the text that is read; the object may or may
@c not be evaluated later.  @xref{Input Functions}, for a description of
@c @code{read}, the basic function for reading objects.
$BFI<T$,BPOCE*$K<0$rI>2A$9$k$H$-!"(B
Lisp$B%$%s%?!<%W%j%?$O!"$^$:!"(B
$B<0$N%F%-%9%HI=8=$rFI$_<h$C$F(BLisp$B%*%V%8%'%/%H$r@8@.$7!"(B
$B$=$N%*%V%8%'%/%H$rI>2A$7$^$9!J(B@pxref{Evaluation}$B!K!#(B
$B$7$+$7$J$,$i!"I>2A$HFI$_<h$j$OJL!9$NF0:n$G$9!#(B
$BFI$_<h$j$G$O!"FI$_<h$C$?%F%-%9%H$,I=$9(BLisp$B%*%V%8%'%/%H$rJV$7$^$9!#(B
$B$3$N%*%V%8%'%/%H$r!"$N$A$KI>2A$9$k>l9g$b$"$j$^$9$,!"(B
$BI>2A$7$J$$>l9g$b$"$j$^$9!#(B
$B%*%V%8%'%/%H$rFI$_<h$k4pK\4X?t(B@code{read}$B$K$D$$$F$O!"(B
@xref{Input Functions}$B!#(B
@node Comments
@comment  node-name,  next,  previous,  up
@c @section Comments
@section $B%3%a%s%H(B
@c @cindex comments
@c @cindex @samp{;} in comment
@cindex $B%3%a%s%H(B
@cindex @samp{;}$B!"%3%a%s%HFb(B
@c   A @dfn{comment} is text that is written in a program only for the sake
@c of humans that read the program, and that has no effect on the meaning
@c of the program.  In Lisp, a semicolon (@samp{;}) starts a comment if it
@c is not within a string or character constant.  The comment continues to
@c the end of line.  The Lisp reader discards comments; they do not become
@c part of the Lisp objects which represent the program within the Lisp
@c system.
@dfn{$B%3%a%s%H(B}$B!J(Bcomment$B!K$O!"%W%m%0%i%`Fb$K=q$+$l$?%F%-%9%H$G$"$j!"(B
$B%W%m%0%i%`$rFI$`?M4V$N$?$a$@$1$K$"$j!"(B
$B%W%m%0%i%`$N0UL#$K$O$^$C$?$/1F6A$7$^$;$s!#(B
Lisp$B$G$O!"J8;zNs$dJ8;zDj?t$N30$K$"$k%;%_%3%m%s!J(B@samp{;}$B!K$G(B
$B%3%a%s%H$r;O$a$^$9!#(B
$B%3%a%s%H$O9TKv$^$G$G$9!#(B
Lisp$B%j!<%@$O!"%3%a%s%H$rGK4~$7$^$9!#(B
$B%3%a%s%H$O!"(B
Lisp$B%7%9%F%`FbIt$G%W%m%0%i%`$rI=$9(BLisp$B%*%V%8%'%/%H$N0lIt$K$O$J$j$^$;$s!#(B
@c   The @samp{#@@@var{count}} construct, which skips the next @var{count}
@c characters, is useful for program-generated comments containing binary
@c data.  The Emacs Lisp byte compiler uses this in its output files
@c (@pxref{Byte Compilation}).  It isn't meant for source files, however.
@samp{#@@@var{count}}$B$H$$$&=q$-J}$O!"(B
$B8eB3$N(B@var{count}$B8D$NJ8;z$rHt$S1[$7$^$9!#(B
$B$3$l$O!"%W%m%0%i%`$G@8@.$7$?%P%$%J%j%G!<%?$r4^$`%3%a%s%H$KJXMx$G$9!#(B
Emacs Lisp$B$N%P%$%H%3%s%Q%$%i$O!"=PNO%U%!%$%k$K$3$N$h$&$J%3%a%s%H$r;H$$$^$9(B
$B!J(B@pxref{Byte Compilation}$B!K!#(B
$B$7$+$7$J$,$i!"%=!<%9%U%!%$%k8~$-$G$O$"$j$^$;$s!#(B
@c   @xref{Comment Tips}, for conventions for formatting comments.
$B%3%a%s%H$NBN:[$K4X$9$k47=,$K$D$$$F$O!"(B@xref{Comment Tips}$B!#(B
@node Programming Types
@c @section Programming Types
@section $B%W%m%0%i%_%s%08~$1$N7?(B
@c @cindex programming types
@cindex $B%W%m%0%i%_%s%08~$1$N7?(B
@cindex $B7?!"%W%m%0%i%_%s%08~$1(B
@c   There are two general categories of types in Emacs Lisp: those having
@c to do with Lisp programming, and those having to do with editing.  The
@c former exist in many Lisp implementations, in one form or another.  The
@c latter are unique to Emacs Lisp.
Emacs Lisp$B$K$O!"Bg$-$/(B2$B<oN`$N7?$,$"$j$^$9!#(B
Lisp$B$N%W%m%0%i%_%s%0$K4X$o$k$b$N$H!"JT=8$K4X$o$k$b$N$G$9!#(B
$BA0<T$O!"$5$^$6$^$J7A$G(BLisp$B$NB?$/$N<BAu$K8+$i$l$^$9!#(B
$B8e<T$O!"(BEmacs Lisp$B$K8GM-$G$9!#(B
@menu
* Integer Type::        Numbers without fractional parts.
* Floating Point Type:: Numbers with fractional parts and with a large range.
* Character Type::      The representation of letters, numbers and
                        control characters.
* Symbol Type::         A multi-use object that refers to a function,
                        variable, or property list, and has a unique identity.
* Sequence Type::       Both lists and arrays are classified as sequences.
* Cons Cell Type::      Cons cells, and lists (which are made from cons cells).
* Array Type::          Arrays include strings and vectors.
* String Type::         An (efficient) array of characters.
* Vector Type::         One-dimensional arrays.
* Char-Table Type::     One-dimensional sparse arrays indexed by characters.
* Bool-Vector Type::    One-dimensional arrays of @code{t} or @code{nil}.
* Function Type::       A piece of executable code you can call from elsewhere.
* Macro Type::          A method of expanding an expression into another
                          expression, more fundamental but less pretty.
* Primitive Function Type::     A function written in C, callable from Lisp.
* Byte-Code Type::      A function written in Lisp, then compiled.
* Autoload Type::       A type used for automatically loading seldom-used
                        functions.
@end menu
@node Integer Type
@c @subsection Integer Type
@subsection $B@0?t7?(B
@c   The range of values for integers in Emacs Lisp is @minus{}134217728 to
@c 134217727 (28 bits; i.e.,
Emacs Lisp$B$K$*$1$k@0?t$NCM$NHO0O$O!"$[$H$s$I$N7W;;5!$G$O!"(B
@minus{}134217728$B$+$i(B134217727$B!J(B28$B%S%C%HD9!#$D$^$j(B
@ifinfo
-2**27
@end ifinfo
@tex
$-2^{27}$
@end tex
@c to
$B$+$i(B
@ifinfo
@c 2**27 - 1)
2**27 - 1$B!K(B
@end ifinfo
@tex
%c $2^{28}-1$)
$2^{27}-1$$B!K(B%c $B8m?"!)(B
@end tex
@c on most machines.  (Some machines may provide a wider range.)  It is
@c important to note that the Emacs Lisp arithmetic functions do not check
@c for overflow.  Thus @code{(1+ 134217727)} is @minus{}134217728 on most
@c machines.
$B$G$9!#(B
$B!J7W;;5!$K$h$C$F$O!"$h$j9-$$HO0O$K$J$k!#!K(B
Emacs Lisp$B$N;;=Q1i;;4X?t$O!"7e0n$l!J%*!<%P%U%m!<!K$r(B
$B8!::$7$J$$$3$H$r3P$($F$*$$$F$/$@$5$$!#(B
$B$7$?$,$C$F!"$[$H$s$I$N7W;;5!$G$O!"(B
@code{(1+ 134217727)}$B$O(B@minus{}134217728$B$H$J$j$^$9!#(B
@c   The read syntax for integers is a sequence of (base ten) digits with an
@c optional sign at the beginning and an optional period at the end.  The
@c printed representation produced by the Lisp interpreter never has a
@c leading @samp{+} or a final @samp{.}.
$B@0?t$NF~NO9=J8$O!"!J(B10$B$r4p?t$H$7$?!K?t;z$NJB$S$G$"$j!"(B
$B@hF,$KId9f$,$"$C$F$b$h$/!"$^$?!":G8e$K%T%j%*%I$,$"$C$F$b$+$^$$$^$;$s!#(B
Lisp$B%$%s%?!<%W%j%?$,@8@.$9$kI=<(I=8=$G$O!"(B
$B@hF,$N(B@samp{+}$B$d:G8e$N(B@samp{.}$B$O$"$j$^$;$s!#(B
@example
@group
@c -1               ; @r{The integer -1.}
@c 1                ; @r{The integer 1.}
@c 1.               ; @r{Also The integer 1.}
@c +1               ; @r{Also the integer 1.}
@c 268435457        ; @r{Also the integer 1 on a 28-bit implementation.}
-1               ; @r{$B@0?t(B -1}
1                ; @r{$B@0?t(B 1}
1.               ; @r{$B$3$l$b@0?t(B 1}
+1               ; @r{$B$3$l$b@0?t(B 1}
268435457        ; @r{28$B%S%C%HD9@0?t$G$O!"$3$l$b@0?t(B 1}
@end group
@end example
@c   @xref{Numbers}, for more information.
$B$h$j>\$7$/$O!"(B@xref{Numbers}$B!#(B
@node Floating Point Type
@c @subsection Floating Point Type
@subsection $BIbF0>.?tE@?t(B
@c   Emacs supports floating point numbers (though there is a compilation
@c option to disable them).  The precise range of floating point numbers is
@c machine-specific.
Emacs$B$OIbF0>.?tE@?t$r07$($^$9(B
$B!J$?$@$7!"%3%s%Q%$%k;~$N%*%W%7%g%s$G;HMQIT2D$K$G$-$k!K!#(B
$BIbF0>.?tE@?t$NHO0O$O!"7W;;5!$K0MB8$7$^$9!#(B
@c   The printed representation for floating point numbers requires either
@c a decimal point (with at least one digit following), an exponent, or
@c both.  For example, @samp{1500.0}, @samp{15e2}, @samp{15.0e2},
@c @samp{1.5e3}, and @samp{.15e4} are five ways of writing a floating point
@c number whose value is 1500.  They are all equivalent.
$BIbF0>.?tE@?t$NI=<(I=8=$K$O!"(B
$B>.?tE@!J$KB3$1$F(B1$B7e0J>e$N>.?tItJ,!K$^$?$O;X?t!"(B
$B$"$k$$$O!"$=$NN>J}$,I,MW$G$9!#(B
$B$?$H$($P!"(B@samp{1500.0}$B!"(B@samp{15e2}$B!"(B@samp{15.0e2}$B!"(B
@samp{1.5e3}$B!"(B@samp{.15e4}$B$O!"F1$8(B1500$B$H$$$&CM$N(B
$BIbF0>.?tE@?t$r=q$/(B5$B$D$NJ}K!$G$9!#(B
$B$I$l$b!"$^$C$?$/Ey2A$G$9!#(B
@c   @xref{Numbers}, for more information.
$B>\$7$/$O!"(B@xref{Numbers}$B!#(B
@node Character Type
@c @subsection Character Type
@subsection $BJ8;z7?(B
@c @cindex @sc{ASCII} character codes
@cindex @sc{ASCII}$BJ8;z%3!<%I(B
@c   A @dfn{character} in Emacs Lisp is nothing more than an integer.  In
@c other words, characters are represented by their character codes.  For
@c example, the character @kbd{A} is represented as the @w{integer 65}.
Emacs Lisp$B$K$*$1$k(B@dfn{$BJ8;z(B}$B!J(Bcharacter$B!K$O!"(B
$B@0?t0J30$N2?J*$G$b$"$j$^$;$s!#(B
$B$$$$$+$($l$P!"J8;z$O$=$NJ8;z%3!<%I$GI=8=$5$l$^$9!#(B
$B$?$H$($P!"J8;z(B@kbd{A}$B$O(B@w{$B@0?t(B 65}$B$HI=8=$5$l$^$9!#(B
@c   Individual characters are not often used in programs.  It is far more
@c common to work with @emph{strings}, which are sequences composed of
@c characters.  @xref{String Type}.
$B%W%m%0%i%`$G8D!9$NJ8;z$rFHN)$K;H$&$3$H$O$"$^$j$"$j$^$;$s!#(B
$BJ8;z$rJB$Y$?(B@emph{$BJ8;zNs(B}$B!J(Bstrings$B!K$H$7$F07$&$3$H$,CGA3B?$$$N$G$9!#(B
@xref{String Type}$B!#(B
@c   Characters in strings, buffers, and files are currently limited to the
@c range of 0 to 524287---nineteen bits.  But not all values in that range
@c are valid character codes.  Codes 0 through 127 are ASCII codes; the
@c rest are non-ASCII (@pxref{Non-ASCII Characters}).  Characters that represent
@c keyboard input have a much wider range, to encode modifier keys such as
@c Control, Meta and Shift.
$BJ8;zNsFb!"%P%C%U%!Fb!"%U%!%$%kFb$NJ8;z$O!"(B
$B8=;~E@$G$O!"(B0$B$+$i(B524287$B$^$G$NHO0O!"(B19$B%S%C%HD9$K@)8B$5$l$^$9!#(B
$B$7$+$7!"$3$NHO0O$NCM$9$Y$F$,@5$7$$J8;z%3!<%I$G$O$"$j$^$;$s!#(B
0$B$+$i(B127$B$^$G$N%3!<%I$O(BASCII$B%3!<%I$G$9!#(B
$B$=$l0J30$O!"Hs(BASCII$B$G$9!J(B@pxref{Non-ASCII Characters}$B!K!#(B
$B%-!<%\!<%IF~NO$rI=$9J8;z$O!"%3%s%H%m!<%k!"%a%?!"%7%U%H$J$I$N(B
$B=$>~%-!<$rId9f2=$9$k$?$a$K!"HO0O$,$h$j9-$/$J$j$^$9!#(B
@c @cindex read syntax for characters
@c @cindex printed representation for characters
@c @cindex syntax for characters
@cindex $BJ8;z$NF~NO9=J8(B
@cindex $BF~NO9=J8!"J8;z(B
@cindex $BJ8;z$NI=<(I=8=(B
@cindex $BI=<(I=8=!"J8;z(B
@cindex $BJ8;z$N9=J8(B
@c   Since characters are really integers, the printed representation of a
@c character is a decimal number.  This is also a possible read syntax for
@c a character, but writing characters that way in Lisp programs is a very
@c bad idea.  You should @emph{always} use the special read syntax formats
@c that Emacs Lisp provides for characters.  These syntax formats start
@c with a question mark.
$BJ8;z$O!"<B:]$K$O@0?t$G$9$+$i!"J8;z$NI=<(I=8=$O(B10$B?J?t$G$9!#(B
$B$^$?!"J8;z$NF~NO9=J8$H$7$F(B10$B?J?t$b2DG=$G$9$,!"(B
Lisp$B%W%m%0%i%`$G$3$N$h$&$KJ8;z$r=q$/$N$O:G0-$G$9!#(B
Emacs Lisp$B$KMQ0U$7$F$"$kJ8;z8~$1$NFCJL$JF~NO9=J8$r(B
@emph{$B$D$M$K(B}$B;H$&$Y$-$G$9!#(B
$B$3$l$i$N9=J8$O5?LdId$G;O$^$j$^$9!#(B
@c   The usual read syntax for alphanumeric characters is a question mark
@c followed by the character; thus, @samp{?A} for the character
@c @kbd{A}, @samp{?B} for the character @kbd{B}, and @samp{?a} for the
@c character @kbd{a}.  
$B1Q?t;z8~$1$NIaDL$NF~NO9=J8$O!"5?LdId$KB3$1$F(B1$B$D$N1Q?t;z$r=q$-$^$9!#(B
$B$7$?$,$C$F!"J8;z(B@kbd{A}$B$O(B@samp{?A}$B!"J8;z(B@kbd{B}$B$O(B@samp{?B}$B!"(B
$BJ8;z(B@kbd{a}$B$O(B@samp{?a}$B$H=q$-$^$9!#(B
@c   For example:
$B$?$H$($P!"$D$.$N$H$*$j$G$9!#(B
@example
?Q @result{} 81     ?q @result{} 113
@end example
@c   You can use the same syntax for punctuation characters, but it is
@c often a good idea to add a @samp{\} so that the Emacs commands for
@c editing Lisp code don't get confused.  For example, @samp{?\ } is the
@c way to write the space character.  If the character is @samp{\}, you
@c @emph{must} use a second @samp{\} to quote it: @samp{?\\}.
$BF1$8F~NO9=J8$r6gFIE@J8;z$K$b;H$($^$9$,!"(B
@samp{\}$B$rDI2C$7$F!"(BLisp$B%3!<%I$rJT=8$9$k(BEmacs$B%3%^%s%I$,:.Mp$7$J$$$h$&$K(B
$B$9$k$3$H$,$h$$$G$7$g$&!#(B
$B$?$H$($P!"6uGrJ8;z$O(B@samp{?\ }$B$H=q$-$^$9!#(B
$BJ8;z(B@samp{\}$B$O!"%/%)!<%H$9$k$?$a$K(B2$B$D$a$N(B@samp{\}$B$r;H$&(B@emph{$BI,MW$,$"$j(B}
@samp{?\\}$B$G$9!#(B
@c @cindex whitespace
@c @cindex bell character
@cindex $BGrJ8;z(B
@cindex $B%Y%kJ8;z(B
@cindex @samp{\a}
@c @cindex backspace
@cindex $B%P%C%/%9%Z!<%9(B
@cindex @samp{\b}
@c @cindex tab
@cindex $B%?%V(B
@cindex @samp{\t}
@c @cindex vertical tab
@cindex $B?bD>%?%V(B
@cindex @samp{\v}
@c @cindex formfeed
@cindex $B%Z!<%8Aw$j(B
@cindex @samp{\f}
@c @cindex newline
@cindex $B2~9T(B
@cindex @samp{\n}
@c @cindex return
@cindex $BI|5"(B
@cindex @samp{\r}
@c @cindex escape
@cindex $B%(%9%1!<%W(B
@cindex @samp{\e}
@c   You can express the characters Control-g, backspace, tab, newline,
@c vertical tab, formfeed, return, and escape as @samp{?\a}, @samp{?\b},
@c @samp{?\t}, @samp{?\n}, @samp{?\v}, @samp{?\f}, @samp{?\r}, @samp{?\e},
@c respectively.  Thus,
$B%3%s%H%m!<%k(Bg$B!"%P%C%/%9%Z!<%9!"%?%V!"2~9T!"(B
$B?bD>%?%V!"%Z!<%8Aw$j!"I|5"!"%(%9%1!<%W$O!"(B
$B$=$l$>$l!"(B@samp{?\a}$B!"(B@samp{?\b}$B!"(B@samp{?\t}$B!"(B@samp{?\n}$B!"(B@samp{?\v}$B!"(B
@samp{?\f}$B!"(B@samp{?\r}$B!"(B@samp{?\e}$B$H=q$-$^$9!#(B
$B$D$^$j!"$D$.$N$H$*$j$G$9!#(B
@example
?\a @result{} 7                 ; @r{@kbd{C-g}}
@c ?\b @result{} 8                 ; @r{backspace, @key{BS}, @kbd{C-h}}
@c ?\t @result{} 9                 ; @r{tab, @key{TAB}, @kbd{C-i}}
@c ?\n @result{} 10                ; @r{newline, @kbd{C-j}}
@c ?\v @result{} 11                ; @r{vertical tab, @kbd{C-k}}
@c ?\f @result{} 12                ; @r{formfeed character, @kbd{C-l}}
@c ?\r @result{} 13                ; @r{carriage return, @key{RET}, @kbd{C-m}}
@c ?\e @result{} 27                ; @r{escape character, @key{ESC}, @kbd{C-[}}
@c ?\\ @result{} 92                ; @r{backslash character, @kbd{\}}
?\b @result{} 8                 ; @r{$B%P%C%/%9%Z!<%9!"(B @key{BS}$B!"(B@kbd{C-h}}
?\t @result{} 9                 ; @r{$B%?%V!"(B @key{TAB}$B!"(B@kbd{C-i}}
?\n @result{} 10                ; @r{$B2~9T!"(B@kbd{C-j}}
?\v @result{} 11                ; @r{$B?bD>%?%V!"(B@kbd{C-k}}
?\f @result{} 12                ; @r{$B%Z!<%8Aw$jJ8;z!"(B@kbd{C-l}}
?\r @result{} 13                ; @r{$BI|5"!"(B@key{RET}, @kbd{C-m}}
?\e @result{} 27                ; @r{$B%(%9%1!<%WJ8;z!"(B@key{ESC}$B!"(B@kbd{C-[}}
?\\ @result{} 92                ; @r{$B%P%C%/%9%i%C%7%eJ8;z!"(B@kbd{\}}
@end example
@c @cindex escape sequence
@cindex $B%(%9%1!<%W%7!<%1%s%9(B
@c   These sequences which start with backslash are also known as
@c @dfn{escape sequences}, because backslash plays the role of an escape
@c character; this usage has nothing to do with the character @key{ESC}.
$B%P%C%/%9%i%C%7%e$G;O$^$k7ONs$O(B
@dfn{$B%(%9%1!<%W%7!<%1%s%9(B}$B!J(Bescape sequences$B!K$H$b8F$S$^$9!#(B
$B%P%C%/%9%i%C%7%e$,!"%(%9%1!<%WJ8;z$NLr3d$r2L$?$9$+$i$G$9!#(B
$B$3$N;H$$J}$O!"J8;z(B@key{ESC}$B$H$O4X78$"$j$^$;$s!#(B
@c @cindex control characters
@cindex $B%3%s%H%m!<%kJ8;z(B
@c   Control characters may be represented using yet another read syntax.
@c This consists of a question mark followed by a backslash, caret, and the
@c corresponding non-control character, in either upper or lower case.  For
@c example, both @samp{?\^I} and @samp{?\^i} are valid read syntax for the
@c character @kbd{C-i}, the character whose value is 9.
$B%3%s%H%m!<%kJ8;z$OJL$NF~NO9=J8$G$bI=8=$G$-$^$9!#(B
$B5?LdId$KB3$1$F%P%C%/%9%i%C%7%e!"%+%l%C%H!J(B@samp{^}$B!K!"$=$7$F!"(B
$BBP1~$9$k%3%s%H%m!<%k$G$J$$J8;z$rBgJ8;z$+>.J8;z$G=q$-$^$9!#(B
$B$?$H$($P!"(B@samp{?\^I}$B$b(B@samp{?\^i}$B$b!"(B
$BCM$,(B9$B$G$"$kJ8;z(B@kbd{C-i}$B$N@5$7$$F~NO9=J8$G$9!#(B
@c   Instead of the @samp{^}, you can use @samp{C-}; thus, @samp{?\C-i} is
@c equivalent to @samp{?\^I} and to @samp{?\^i}:
$B%+%l%C%H$N$+$o$j$K!"(B@samp{C-}$B$r;H$C$F$b$+$^$$$^$;$s!#(B
$B$G$9$+$i!"(B@samp{?\C-i}$B$O!"(B@samp{?\^I}$B$d(B@samp{?\^i}$B$HEy2A$G$9!#(B
@example
?\^I @result{} 9     ?\C-I @result{} 9
@end example
@c   In strings and buffers, the only control characters allowed are those
@c that exist in @sc{ASCII}; but for keyboard input purposes, you can turn
@c any character into a control character with @samp{C-}.  The character
@c codes for these non-@sc{ASCII} control characters include the
$BJ8;zNs$d%P%C%U%!Fb$G$O(B@sc{ASCII}$B$N%3%s%H%m!<%kJ8;z$@$1$,5v$5$l$^$9$,!"(B
$B%-!<%\!<%IF~NO$K$*$$$F$O(B@samp{C-}$B$GG$0U$NJ8;z$r%3%s%H%m!<%kJ8;z$K$G$-$^$9!#(B
$B$3$l$i$NHs(B@sc{ASCII}$B%3%s%H%m!<%kJ8;z$NJ8;z%3!<%I$O!"(B
$BBP1~$9$kHs%3%s%H%m!<%kJ8;z$NJ8;z%3!<%I$H(B
@tex
$2^{26}$
@end tex
@ifinfo
2**26
@end ifinfo
@c bit as well as the code for the corresponding non-control
@c character.  Ordinary terminals have no way of generating non-@sc{ASCII}
@c control characters, but you can generate them straightforwardly using X
@c and other window systems.
$B$N%S%C%H$r4^$_$^$9!#(B
$BIaDL$NC<Kv$G$O!"Hs(B@sc{ASCII}$B%3%s%H%m!<%kJ8;z$r@8@.$9$k<jN)$F$O$"$j$^$;$s$,!"(B
X$B%&%#%s%I%&%7%9%F%`$dB>$N%&%#%s%I%&%7%9%F%`$G$O!"(B
$B4JC1$K@8@.$G$-$^$9!#(B
@c   For historical reasons, Emacs treats the @key{DEL} character as
@c the control equivalent of @kbd{?}:
$BNr;KE*$JM}M3$G!"(B
Emacs$B$O(B@key{DEL}$BJ8;z$r(B@kbd{?}$B$KBP1~$7$?%3%s%H%m!<%kJ8;z$H$7$F07$$$^$9!#(B
@example
?\^? @result{} 127     ?\C-? @result{} 127
@end example
@noindent
@c As a result, it is currently not possible to represent the character
@c @kbd{Control-?}, which is a meaningful input character under X, using
@c @samp{\C-}.  It is not easy to change this, as various Lisp files refer
@c to @key{DEL} in this way.
$B$=$N7k2L!":#$N$H$3$m!"(B
X$B%&%#%s%I%&%7%9%F%`$N$b$H$G$O0UL#$N$"$kJ8;z(B@kbd{Control-?}$B$r(B
@samp{\C-}$B$G$OI=8=$G$-$^$;$s!#(B
@c   For representing control characters to be found in files or strings,
@c we recommend the @samp{^} syntax; for control characters in keyboard
@c input, we prefer the @samp{C-} syntax.  Which one you use does not
@c affect the meaning of the program, but may guide the understanding of
@c people who read it.
$B%U%!%$%k$dJ8;zNs$K8=$l$k%3%s%H%m!<%kJ8;z$rI=8=$9$k$K$O!"(B
@samp{^}$B9=J8$r4+$a$^$9!#(B
$B%-!<%\!<%IF~NO$N%3%s%H%m!<%kJ8;z$K$O!"(B@samp{C-}$B9=J8$,9%$^$7$$$G$9!#(B
$B$I$A$i$r;H$C$F$b%W%m%0%i%`$N0UL#$K$O1F6A$7$^$;$s$,!"(B
$B$=$l$rFI$`?M$K$OM}2r$N<j=u$1$K$J$k$+$b$7$l$^$;$s!#(B
@c @cindex meta characters
@cindex $B%a%?J8;z(B
@c   A @dfn{meta character} is a character typed with the @key{META}
@c modifier key.  The integer that represents such a character has the
@dfn{$B%a%?J8;z(B}$B!J(Bmeta character$B!K$O!"(B
@key{META}$B=$>~%-!<$r;H$C$FBG$C$?J8;z$G$9!#(B
$B$=$N$h$&$JJ8;z$rI=$9@0?t$O!"!J$[$H$s$I$N7W;;5!$G$OIi$N?t$K$J$k!K(B
@tex
$2^{27}$
@end tex
@ifinfo
2**27
@end ifinfo
@c bit set (which on most machines makes it a negative number).  We
@c use high bits for this and other modifiers to make possible a wide range
@c of basic character codes.
$B$N%S%C%H$,%;%C%H$5$l$F$$$^$9!#(B
$B>e0L$N%S%C%H$r%a%?$dB>$N=$>~;R$KMQ$$$k$3$H$G!"(B
$B4pK\$H$J$kJ8;z%3!<%I$NHO0O$r$G$-$k$@$1Bg$-$/$7$^$9!#(B
@c   In a string, the
$BJ8;zNs$G$O!"%a%?J8;z$rI=$9(BASCII$BJ8;z$K$O(B
@tex
$2^{7}$
@end tex
@ifinfo
2**7
@end ifinfo
@c bit attached to an ASCII character indicates a meta character; thus, the
@c meta characters that can fit in a string have codes in the range from
@c 128 to 255, and are the meta versions of the ordinary @sc{ASCII}
@c characters.  (In Emacs versions 18 and older, this convention was used
@c for characters outside of strings as well.)
$B$N%S%C%H$rIU2C$7$^$9!#(B
$B$D$^$j!"J8;zNs$K<}$a$i$l$k%a%?J8;z$N%3!<%I$O(B128$B$+$i(B255$B$NHO0O$G$"$j!"(B
$BG$0U$N(B@sc{ASCII}$BJ8;z$N%a%?JQ<o$r;H$($^$9!#(B
$B!J(BEmacs 18$B$d$=$l0JA0$G$O!"$3$NJ}<0$rJ8;zNs$N30$K$"$kJ8;z$K$b;H$C$F$$$?!#!K(B
@c   The read syntax for meta characters uses @samp{\M-}.  For example,
@c @samp{?\M-A} stands for @kbd{M-A}.  You can use @samp{\M-} together with
@c octal character codes (see below), with @samp{\C-}, or with any other
@c syntax for a character.  Thus, you can write @kbd{M-A} as @samp{?\M-A},
@c or as @samp{?\M-\101}.  Likewise, you can write @kbd{C-M-b} as
@c @samp{?\M-\C-b}, @samp{?\C-\M-b}, or @samp{?\M-\002}.
$B%a%?J8;z$NF~NO9=J8$K$O(B@samp{\M-}$B$r;H$$$^$9!#(B
$B$?$H$($P!"(B@samp{?\M-A}$B$O(B@kbd{M-A}$B$G$9!#(B
@samp{\M-}$B$H0l=o$K(B8$B?JJ8;z%3!<%I$b;H$($^$9$7!J2<5-;2>H!K!"(B
@samp{\C-}$B$dJ8;z8~$1$NB>$N9=J8$b;H$($^$9!#(B
$B$7$?$,$C$F!"(B@kbd{M-A}$B$O(B@samp{?\M-A}$B$H=q$$$?$j(B@samp{?\M-\101}$B$H=q$1$^$9!#(B
$BF1MM$K!"(B@kbd{C-M-b}$B$O(B@samp{?\M-\C-b}$B!"(B
@samp{?\C-\M-b}$B!"(B@samp{?\M-\002}$B$H=q$1$^$9!#(B
@c   The case of a graphic character is indicated by its character code;
@c for example, @sc{ASCII} distinguishes between the characters @samp{a}
@c and @samp{A}.  But @sc{ASCII} has no way to represent whether a control
@c character is upper case or lower case.  Emacs uses the
$B?^7AJ8;z$NBgJ8;z>.J8;z$O!"$=$NJ8;z%3!<%I$G<($5$l$^$9!#(B
$B$?$H$($P!"(B@sc{ASCII}$B$G$O(B@samp{a}$B$H(B@samp{A}$B$NJ8;z$r6hJL$7$^$9!#(B
$B$7$+$7!"(B@sc{ASCII}$B$G$O%3%s%H%m!<%kJ8;z$NBgJ8;z>.J8;z$rI=8=$G$-$^$;$s!#(B
Emacs$B$G$O!"%3%s%H%m!<%kJ8;z$rBG$D$H$-$K;H$C$?%7%U%H%-!<$rI=$9$?$a$K(B
@tex
$2^{25}$
@end tex
@ifinfo
2**25
@end ifinfo
@c bit to indicate that the shift key was used in typing a control
@c character.  This distinction is possible only when you use X terminals
@c or other special terminals; ordinary terminals do not report the
@c distinction to the computer in any way.
$B$N%S%C%H$rIU2C$7$^$9!#(B
$B$3$N$h$&$J6hJL$O(BX$BC<Kv$dB>$NFCJL$JC<Kv$r;H$C$F$$$k>l9g$K8B$j2DG=$G$9!#(B
$BIaDL$NC<Kv$G$O$3$N$h$&$J6hJL$r7W;;5!$KAw$l$^$;$s!#(B
@c @cindex hyper characters
@c @cindex super characters
@c @cindex alt characters
@cindex $B%O%$%Q!<J8;z(B
@cindex $B%9!<%Q!<J8;z(B
@cindex $B%"%k%HJ8;z(B
@c   The X Window System defines three other modifier bits that can be set
@c in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}.  The syntaxes
@c for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}.  (Case is
@c significant in these prefixes.)  Thus, @samp{?\H-\M-\A-x} represents
@c @kbd{Alt-Hyper-Meta-x}.
X$B%&%#%s%I%&%7%9%F%`$G$O!"(B
$BJ8;z$K@_Dj2DG=$J=$>~%S%C%H$,B>$K(B3$B$D$"$j$^$9!#(B
@dfn{$B%O%$%Q!<(B}$B!J(Bhyper$B!K!"(B@dfn{$B%9!<%Q!<(B}$B!J(Bsuper$B!K!"(B@dfn{$B%"%k%H(B}$B!J(Balt$B!K$G$9!#(B
$B$3$l$i$N=$>~%S%C%H$N9=J8$O!"(B
@samp{\H-}$B!"(B@samp{\s-}$B!"(B@samp{\A-}$B$G$9!#(B
$B!J$3$l$i$N%W%l%U%#%C%/%9$G$O!"BgJ8;z>.J8;z$r6hJL$9$k!#!K(B
$B$7$?$,$C$F!"(B@samp{?\H-\M-\A-x}$B$O(B@kbd{Alt-Hyper-Meta-x}$B$rI=$7$^$9!#(B
@tex
%c Numerically, the
%c bit values are $2^{22}$ for alt, $2^{23}$ for super and $2^{24}$ for hyper.
$B?tCME*$K$O!"(B
$B%"%k%H$O(B$2^{22}$$B!"%9!<%Q!<$O(B$2^{23}$$B!"%O%$%Q!<$O(B$2^{24}$$B$N%S%C%HCM$G$9!#(B
@end tex
@ifinfo
@c Numerically, the
@c bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
$B?tCME*$K$O!"(B
$B%"%k%H$O(B2**22$B!"%9!<%Q!<$O(B2**23$B!"%O%$%Q!<$O(B2**24$B$N%S%C%HCM$G$9!#(B
@end ifinfo
@c @cindex @samp{?} in character constant
@c @cindex question mark in character constant
@c @cindex @samp{\} in character constant
@c @cindex backslash in character constant
@c @cindex octal character code
@cindex @samp{?}$B!"J8;zDj?t(B
@cindex $BJ8;zDj?t!"(B@samp{?}
@cindex $B5?LdId!"J8;zDj?t(B
@cindex $BJ8;zDj?t!"5?LdId(B
@cindex @samp{\}$B!"J8;zDj?t(B
@cindex $BJ8;zDj?t!"(B@samp{\}
@cindex $B%P%C%/%9%i%C%7%e!"J8;zDj?t(B
@cindex $BJ8;zDj?t!"%P%C%/%9%i%C%7%e(B
@cindex 8$B?J?t;zJ8;zDj?t(B
@cindex $BJ8;zDj?t!"(B8$B?J?t;z(B
@c   Finally, the most general read syntax for a character represents the
@c character code in either octal or hex.  To use octal, write a question
@c mark followed by a backslash and the octal character code (up to three
@c octal digits); thus, @samp{?\101} for the character @kbd{A},
@c @samp{?\001} for the character @kbd{C-a}, and @code{?\002} for the
@c character @kbd{C-b}.  Although this syntax can represent any @sc{ASCII}
@c character, it is preferred only when the precise octal value is more
@c important than the @sc{ASCII} representation.
$BJ8;z8~$1$N$b$C$H$bHFMQ$NF~NO9=J8$G$O!"(B
$BJ8;z%3!<%I$r(B8$B?J?t$d(B16$B?J?t$GI=8=$7$^$9!#(B
8$B?J?t$r;H$&$K$O!"=g$K!"(B
$B5?LdId!"%P%C%/%9%i%C%7%e!"!J(B3$B7e$^$G$N!K(B8$B?J?t;zJ8;z%3!<%I$r=q$-$^$9!#(B
$B$?$H$($P!"(B@samp{?\101}$B$OJ8;z(B@kbd{A}$B$rI=$7!"(B
@samp{?\001}$B$OJ8;z(B@kbd{C-a}$B$rI=$7!"(B@code{?\002}$B$OJ8;z(B@kbd{C-b}$B$rI=$7$^$9!#(B
$B$3$N9=J8$GG$0U$N(B@sc{ASCII}$BJ8;z$rI=8=$G$-$^$9$,!"(B
@sc{ASCII}$B$G$NI=8=$h$j$b(B8$B?J?tCM$GI=8=$9$k$3$H$,=EMW$J>l9g$K8B$k$Y$-$G$9!#(B
@example
@group
?\012 @result{} 10         ?\n @result{} 10         ?\C-j @result{} 10
?\101 @result{} 65         ?A @result{} 65
@end group
@end example
@c   To use hex, write a question mark followed by a backslash, @samp{x},
@c and the hexadecimal character code.  You can use any number of hex
@c digits, so you can represent any character code in this way.
@c Thus, @samp{?\x41} for the character @kbd{A}, @samp{?\x1} for the
@c character @kbd{C-a}, and @code{?\x8e0} for the character
16$B?J?t$r;H$&$K$O!"=g$K!"5?LdId!"%P%C%/%9%i%C%7%e!"(B
@samp{x}$B!"(B16$B?J?t;zJ8;z%3!<%I$r=q$-$^$9!#(B
16$B?J?t$N7e?t$O$$$/$D$G$b$h$$$N$G!"G$0U$NJ8;z%3!<%I$rI=8=$G$-$^$9!#(B
$B$7$?$,$C$F!"(B@samp{?\x41}$B$OJ8;z(B@kbd{A}$B$rI=$7!"(B
@samp{?\x1}$B$OJ8;z(B@kbd{C-a}$B$rI=$7!"(B
@code{?\x8e0}$B$O(B
@iftex
@c @samp{@`a}.
$BJ8;z(B@samp{@`a}$BI=$7$^$9!#(B
@end iftex
@ifinfo
@c @samp{a} with grave accent.
$B%0%l!<%V%"%/%;%s%HIU$-$NJ8;z(B@samp{a}$B$rI=$7$^$9!#(B
@end ifinfo
@c   A backslash is allowed, and harmless, preceding any character without
@c a special escape meaning; thus, @samp{?\+} is equivalent to @samp{?+}.
@c There is no reason to add a backslash before most characters.  However,
@c you should add a backslash before any of the characters
@c @samp{()\|;'`"#.,} to avoid confusing the Emacs commands for editing
@c Lisp code.  Also add a backslash before whitespace characters such as
@c space, tab, newline and formfeed.  However, it is cleaner to use one of
@c the easily readable escape sequences, such as @samp{\t}, instead of an
@c actual whitespace character such as a tab.
$BFCJL$J%(%9%1!<%W$N0UL#$r;}$?$J$$$I$s$JJ8;z$N$^$($K$b%P%C%/%9%i%C%7%e$r(B
$BIU$1$k$3$H$,$G$-!"$7$+$b!"L532$G$9!#(B
$B$7$?$,$C$F!"(B@samp{?\+}$B$O(B@samp{?+}$B$KEy2A$G$9!#(B
$B$[$H$s$I$NJ8;z$N$^$($K%P%C%/%9%i%C%7%e$rIU$1$kM}M3$O$"$j$^$;$s!#(B
$B$7$+$7$J$,$i!"(BLisp$B%3!<%I$rJT=8$9$k(BEmacs$B%3%^%s%I$,:.Mp$7$J$$$h$&$K!"(B
@samp{()\|;'`"#.,}$B$N$$$:$l$+$NJ8;z$N$^$($K$O%P%C%/%9%i%C%7%e$rIU$1$k$Y$-$G$9!#(B
$B6uGr!"%?%V!"2~9T!"%Z!<%8Aw$j$N$h$&$JGrJ8;z$N$^$($K$b(B
$B%P%C%/%9%i%C%7%e$rIU$1$k$Y$-$G$9!#(B
$B$7$+$7$J$,$i!"%?%V$J$I$N<B:]$NGrJ8;z$N$+$o$j$K!"(B
@samp{\t}$B$J$I$NFI$_$d$9$$%(%9%1!<%W%7!<%1%s%9$r;H$C$?$[$&$,L@3N$G$9!#(B
@node Symbol Type
@c @subsection Symbol Type
@subsection $B%7%s%\%k7?(B
@c   A @dfn{symbol} in GNU Emacs Lisp is an object with a name.  The symbol
@c name serves as the printed representation of the symbol.  In ordinary
@c use, the name is unique---no two symbols have the same name.
GNU Emacs Lisp$B$K$*$1$k(B@dfn{$B%7%s%\%k(B}$B!J(Bsymbol$B!K$O!"(B
$BL>A0$r;}$C$?%*%V%8%'%/%H$G$9!#(B
$B%7%s%\%kL>$O!"%7%s%\%k$NI=<(I=8=$H$7$F$NLr3d$,$"$j$^$9!#(B
$BIaDL$N;H$$J}$G$O!"L>A0$O0l0U$G$9!#(B
$B$D$^$j!"(B2$B$D$N%7%s%\%k$,F1$8L>A0$r;}$D$3$H$O$"$j$^$;$s!#(B
@c   A symbol can serve as a variable, as a function name, or to hold a
@c property list.  Or it may serve only to be distinct from all other Lisp
@c objects, so that its presence in a data structure may be recognized
@c reliably.  In a given context, usually only one of these uses is
@c intended.  But you can use one symbol in all of these ways,
@c independently.
$B%7%s%\%k$O!"JQ?t$H$7$F$NLr3d!"4X?tL>$H$7$F$NLr3d!"(B
$B$"$k$$$O!"B0@-%j%9%H$rJ];}$9$kLr3d$r2L$?$7$^$9!#(B
$B$^$?!"B>$N$9$Y$F$N(BLisp$B%*%V%8%'%/%H$H6hJL$9$k$?$a$@$1$NLr3d$r(B
$B2L$?$9$3$H$b$"$j!"%G!<%?9=B$$NFbIt$K$=$N$h$&$J%7%s%\%k$,B8:_$9$k$3$H$r(B
$B@53N$KG'<1$G$-$^$9!#(B
$B$"$k>lLL$K$*$$$F$O!"IaDL!"$3$l$i$N$&$A$N(B1$B$D$N;H$$J}$r$7$^$9!#(B
$B$7$+$7!"$"$k(B1$B$D$N%7%s%\%k$KBP$7$F$9$Y$F$N;H$$J}$r$7$F$b$+$^$$$^$;$s!#(B
@c @cindex @samp{\} in symbols
@c @cindex backslash in symbols
@cindex @samp{\}$B!"%7%s%\%kFb(B
@cindex $B%P%C%/%9%i%C%7%e!"%7%s%\%kFb(B
@c   A symbol name can contain any characters whatever.  Most symbol names
@c are written with letters, digits, and the punctuation characters
@c @samp{-+=*/}.  Such names require no special punctuation; the characters
@c of the name suffice as long as the name does not look like a number.
@c (If it does, write a @samp{\} at the beginning of the name to force
@c interpretation as a symbol.)  The characters @samp{_~!@@$%^&:<>@{@}} are
@c less often used but also require no special punctuation.  Any other
@c characters may be included in a symbol's name by escaping them with a
@c backslash.  In contrast to its use in strings, however, a backslash in
@c the name of a symbol simply quotes the single character that follows the
@c backslash.  For example, in a string, @samp{\t} represents a tab
@c character; in the name of a symbol, however, @samp{\t} merely quotes the
@c letter @samp{t}.  To have a symbol with a tab character in its name, you
@c must actually use a tab (preceded with a backslash).  But it's rare to
@c do such a thing.
$B%7%s%\%kL>$K$O!"$I$s$JJ8;z$G$b4^$a$i$l$^$9!#(B
$B$[$H$s$I$N%7%s%\%kL>$O!"1QJ8;z!"?t;z!"(B@samp{-+=*/}$B$N6gFIE@J8;z$G=q$+$l$^$9!#(B
$B$=$N$h$&$JL>A0$G$O!"FCJL$J=q$-J}$OI,MW$"$j$^$;$s!#(B
$BL>A0$,?t$K8+$($J$1$l$P!"L>A0$r9=@.$9$kJ8;z$O$J$s$G$b$h$$$N$G$9!#(B
$B!JL>A0$,?t$K8+$($k$H$-$K$O!"(B
$BL>A0$N@hF,$K(B@samp{\}$B$r=q$$$F%7%s%\%k$G$"$k$H6/@)$9$k!#!K(B
@samp{_~!@@$%^&:<>@{@}}$B$NJ8;z$O$"$^$j;H$o$l$^$;$s$,!"(B
$B$3$l$i$K$bFCJL$J=q$-J}$OI,MW$"$j$^$;$s!#(B
$B$3$l$i0J30$NJ8;z$O!"%P%C%/%9%i%C%7%e$G%(%9%1!<%W$9$l$P!"(B
$B%7%s%\%kL>$K4^$a$i$l$^$9!#(B
$BJ8;zNs$K$*$1$k%P%C%/%9%i%C%7%e$NMQK!$H$OBP>HE*$K!"(B
$B%7%s%\%kL>$K$*$1$k%P%C%/%9%i%C%7%e$O!"D>8e$N(B1$BJ8;z$r%/%)!<%H$9$k$@$1$G$9!#(B
$B$?$H$($P!"J8;zNs$G$O(B@samp{\t}$B$O%?%VJ8;z$rI=$7$^$9$,!"(B
$B%7%s%\%kL>$G$O1QJ8;z(B@samp{t}$B$r%/%)!<%H$9$k$@$1$G$9!#(B
$BL>A0$K%?%VJ8;z$r4^$`%7%s%\%k$r=q$/$K$O!"(B
$B<B:]$K!J%P%C%/%9%i%C%7%e$ND>8e$K!K%?%V$r;H$&I,MW$,$"$j$^$9!#(B
$B$7$+$7!"$=$N$h$&$J$3$H$r$9$k$N$O3'L5$G$7$g$&!#(B
@c @cindex CL note---case of letters
@cindex CL$B$K4X$7$?Cm0U!]!]BgJ8;z>.J8;z$N6hJL(B
@quotation
@c @b{Common Lisp note:} In Common Lisp, lower case letters are always
@c ``folded'' to upper case, unless they are explicitly escaped.  In Emacs
@c Lisp, upper case and lower case letters are distinct.
@b{Common Lisp$B$K4X$7$?Cm0U!'(B}@code{ }
Common Lisp$B$G$O!">.J8;z$rL@<(E*$K%(%9%1!<%W$7$J$$8B$j!"(B
$B>.J8;z$r$D$M$KBgJ8;z$K!XJQ49!Y$9$k!#(B
Emacs Lisp$B$G$O!"BgJ8;z$H>.J8;z$r6hJL$9$k!#(B
@end quotation
@c   Here are several examples of symbol names.  Note that the @samp{+} in
@c the fifth example is escaped to prevent it from being read as a number.
@c This is not necessary in the sixth example because the rest of the name
@c makes it invalid as a number.
$B%7%s%\%kL>$NNc$r$$$/$D$+$"$2$^$7$g$&!#(B
5$BHVL\$NNc$N(B@samp{+}$B$O!"?t$H$7$FFI$^$l$k$N$rKI$0$?$a$K(B
$B%(%9%1!<%W$7$F$"$k$3$H$KCm0U$7$F$/$@$5$$!#(B
6$BHVL\$NNc$G$O!"$3$l$OI,MW$"$j$^$;$s!#(B
$B$J$<$J$i!"L>A0$N;D$j$NItJ,$,?t$H$7$F$OIT@5$@$+$i$G$9!#(B
@example
@group
@c foo                 ; @r{A symbol named @samp{foo}.}
@c FOO                 ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
@c char-to-string      ; @r{A symbol named @samp{char-to-string}.}
foo                 ; @r{@samp{foo}$B$H$$$&L>A0$N%7%s%\%k(B}
FOO                 ; @r{@samp{FOO}$B$H$$$&L>A0$N%7%s%\%k!"(B@samp{foo}$B$H$OJL(B}
char-to-string      ; @r{@samp{char-to-string}$B$H$$$&L>A0$N%7%s%\%k(B}
@end group
@group
@c 1+                  ; @r{A symbol named @samp{1+}}
@c                     ;   @r{(not @samp{+1}, which is an integer).}
1+                  ; @r{@samp{1+}$B$H$$$&L>A0$N%7%s%\%k(B}
                    ;   @r{$B!J@0?t$N(B@samp{+1}$B$G$O$J$$!K(B}
@end group
@group
@c \+1                 ; @r{A symbol named @samp{+1}}
@c                     ;   @r{(not a very readable name).}
\+1                 ; @r{@samp{+1}$B$H$$$&L>A0$N%7%s%\%k(B}
                    ;   @r{$B!JFI$_$K$/$$L>A0!K(B}
@end group
@group
@c \(*\ 1\ 2\)         ; @r{A symbol named @samp{(* 1 2)} (a worse name).}
\(*\ 1\ 2\)         ; @r{@samp{(* 1 2)}$B$H$$$&L>A0$N%7%s%\%k!J0-$$L>A0!K(B}
@c @c the @'s in this next line use up three characters, hence the
@c @c apparent misalignment of the comment.
@c +-*/_~!@@$%^&=:<>@{@}  ; @r{A symbol named @samp{+-*/_~!@@$%^&=:<>@{@}}.}
@c                     ;   @r{These characters need not be escaped.}
+-*/_~!@@$%^&=:<>@{@}  ; @r{@samp{+-*/_~!@@$%^&=:<>@{@}}$B$H$$$&L>A0$N%7%s%\%k(B}
                    ;   @r{$B$3$l$i$NJ8;z$r%(%9%1!<%W$9$kI,MW$O$J$$(B}
@end group
@end example
@node Sequence Type
@c @subsection Sequence Types
@subsection $B%7!<%1%s%97?(B
@c   A @dfn{sequence} is a Lisp object that represents an ordered set of
@c elements.  There are two kinds of sequence in Emacs Lisp, lists and
@c arrays.  Thus, an object of type list or of type array is also
@c considered a sequence.
@dfn{$B%7!<%1%s%9(B}$B!J(Bsequence$B!K$H$O!"(B
$BMWAG$N=g=x=89g$rI=8=$9$k(BLisp$B%*%V%8%'%/%H$G$9!#(B
Emacs Lisp$B$K$O(B2$B<oN`$N%7!<%1%s%9!"$D$^$j!"%j%9%H$HG[Ns$,$"$j$^$9!#(B
$B$7$?$,$C$F!"%j%9%H7?$dG[Ns7?$N%*%V%8%'%/%H$O!"(B
$B%7!<%1%s%97?$G$b$"$k$H9M$($i$l$^$9!#(B
@c   Arrays are further subdivided into strings, vectors, char-tables and
@c bool-vectors.  Vectors can hold elements of any type, but string
@c elements must be characters, and bool-vector elements must be @code{t}
@c or @code{nil}.  The characters in a string can have text properties like
@c characters in a buffer (@pxref{Text Properties}); vectors and
@c bool-vectors do not support text properties even when their elements
@c happen to be characters.  Char-tables are like vectors except that they
@c are indexed by any valid character code.
$BG[Ns$O$5$i$K!"J8;zNs!"%Y%/%H%k!"J8;z%F!<%V%k!"%V!<%k%Y%/%H%k$K:YJ,$5$l$^$9!#(B
$B%Y%/%H%k$OG$0U$N7?$NMWAG$rJ];}$G$-$^$9$,!"(B
$BJ8;zNs$NMWAG$OJ8;z$G$"$kI,MW$,$"$j!"(B
$B%V!<%k%Y%/%H%k$NMWAG$O(B@code{t}$B$+(B@code{nil}$B$N$$$:$l$+$G$"$kI,MW$,$"$j$^$9!#(B
$B%P%C%U%!Fb$NJ8;z$N$h$&$K!"(B
$BJ8;zNsFb$NJ8;z$O%F%-%9%HB0@-$r;}$F$^$9!J(B@pxref{Text Properties}$B!K!#(B
$B%Y%/%H%k$H%V!<%k%Y%/%H%k(B
@footnote{$B!ZLuCm![%Y%/%H%k$N$_$N8m$j!)(B}
$B$G$O!"$=$l$i$NMWAG$,J8;z$G$"$C$?$H$7$F$b!"(B
$B%F%-%9%HB0@-$r07$($^$;$s!#(B
$BJ8;z%F!<%V%k$O!"%Y%/%H%k$K;w$F$$$^$9$,!"@5$7$$J8;z%3!<%I$GE:;zIU$1$7$^$9!#(B
@c   Lists, strings and the other array types are different, but they have
@c important similarities.  For example, all have a length @var{l}, and all
@c have elements which can be indexed from zero to @var{l} minus one.
@c Several functions, called sequence functions, accept any kind of
@c sequence.  For example, the function @code{elt} can be used to extract
@c an element of a sequence, given its index.  @xref{Sequences Arrays
@c Vectors}.
$B%j%9%H!"J8;zNs!"$*$h$S!"$=$NB>$NG[Ns7?$OJL$N$b$N$G$9$,!"(B
$B$=$l$i$K$O=EMW$JN`;w@-$,$"$j$^$9!#(B
$B$?$H$($P!"$=$l$i$9$Y$F$KD9$5(B@var{l}$B$,$"$j!"(B
$B$=$l$i$N$9$Y$F$NMWAG$O(B0$B$+$i(B@var{l}@minus{}1$B$GE:;zIU$1$G$-$^$9!#(B
$B%7!<%1%s%94X?t$H8F$P$l$k$$$/$D$+$N4X?t$O!"(B
$BG$0U$N%7!<%1%s%97?$r07$$$^$9!#(B
$B$?$H$($P!"%7!<%1%s%9$+$i;XDj$7$?E:;z$NMWAG$r<h$j=P$9$K$O!"(B
$B4X?t(B@code{elt}$B$r;H$$$^$9!#(B
@xref{Sequences Arrays Vectors}$B!#(B
@c   It is generally impossible to read the same sequence twice, since
@c sequences are always created anew upon reading.  If you read the read
@c syntax for a sequence twice, you get two sequences with equal contents.
@c There is one exception: the empty list @code{()} always stands for the
@c same object, @code{nil}.
$B0lHL$K$O!"F10l$N%7!<%1%s%9$rFsEYFI$_<h$k$3$H$OIT2DG=$G$9!#(B
$B$H$$$&$N$O!"FI$`$?$S$K$D$M$K?7$?$K%7!<%1%s%9$r:n@.$9$k$+$i$G$9!#(B
$B%7!<%1%s%9$NF~NO9=J8$rFsEYFI$`$H!"(B
$BF1$8FbMF$N(B2$B$D$N%7!<%1%s%9$rF@$k$3$H$K$J$j$^$9!#(B
1$B$DNc30$,$"$j$^$9!#(B
$B6u%j%9%H(B@code{()}$B$O!"$D$M$KF1$8%*%V%8%'%/%H(B@code{nil}$B$rI=$7$^$9!#(B
@node Cons Cell Type
@c @subsection Cons Cell and List Types
@subsection $B%3%s%9%;%k$H%j%9%H7?(B
@c @cindex address field of register
@c @cindex decrement field of register
@c @cindex pointers
@cindex $B%l%8%9%?$NHVCO%U%#!<%k%I(B
@cindex $B%l%8%9%?$N8:?t%U%#!<%k%I(B
@cindex $B%]%$%s%?(B
@c   A @dfn{cons cell} is an object that consists of two pointers or slots,
@c called the @sc{car} slot and the @sc{cdr} slot.  Each slot can
@c @dfn{point to} or hold to any Lisp object.  We also say that the ``the
@c @sc{car} of this cons cell is'' whatever object its @sc{car} slot
@c currently points to, and likewise for the @sc{cdr}.
@dfn{$B%3%s%9%;%k(B}$B!J(Bcons cell$B!K$H$O!"(B
@sc{car}$B%9%m%C%H$*$h$S(B@sc{cdr}$B%9%m%C%H$H8F$P$l$k(B
2$B$D$N%]%$%s%?$+$i@.$k%*%V%8%'%/%H$G$9!#(B
$B3F%9%m%C%H$O!"G$0U$N(BLisp$B%*%V%8%'%/%H$r(B@dfn{$B;X$9(B}$B$3$H$,$G$-$^$9!#(B
$B$^$?!"8=:_(B@sc{car}$B%9%m%C%H$,;X$7$F$$$k%*%V%8%'%/%H$,$J$s$G$"$l!"(B
$B!X%3%s%9%;%k$N(B@sc{car}$B$O!Y$H$$$C$?$$$$J}$r$7$^$9!#(B
@sc{cdr}$B$K$D$$$F$bF1MM$G$9!#(B
@c   A @dfn{list} is a series of cons cells, linked together so that the
@c @sc{cdr} slot of each cons cell holds either the next cons cell or the
@c empty list.  @xref{Lists}, for functions that work on lists.  Because
@c most cons cells are used as part of lists, the phrase @dfn{list
@c structure} has come to refer to any structure made out of cons cells.
@dfn{$B%j%9%H(B}$B!J(Blist$B!K$O%3%s%9%;%k$,O"$J$C$?$b$N$G$"$j!"(B
$B3F%3%s%9%;%k$N(B@sc{cdr}$B%9%m%C%H$O!"(B
$B8eB3$N%3%s%9%;%k$r;X$9$+6u%j%9%H$r;X$7$^$9!#(B
$B%j%9%H$K:nMQ$9$k4X?t$K$D$$$F$O!"(B@xref{Lists}$B!#(B
$B$[$H$s$I$N%3%s%9%;%k$O!"%j%9%H$N0lItJ,$H$7$F;H$o$l$k$N$G!"(B
@dfn{$B%j%9%H9=B$(B}$B!J(Blist structure$B!K$H$$$&MQ8l$O!"(B
$B%3%s%9%;%k$+$i@.$kG$0U$N9=B$$N$3$H$r0UL#$7$^$9!#(B
@c   The names @sc{car} and @sc{cdr} derive from the history of Lisp.  The
@c original Lisp implementation ran on an @w{IBM 704} computer which
@c divided words into two parts, called the ``address'' part and the
@c ``decrement''; @sc{car} was an instruction to extract the contents of
@c the address part of a register, and @sc{cdr} an instruction to extract
@c the contents of the decrement.  By contrast, ``cons cells'' are named
@c for the function @code{cons} that creates them, which in turn is named
@c for its purpose, the construction of cells.
@sc{car}$B$d(B@sc{cdr}$B$H$$$&L>>N$O!"(BLisp$B$NNr;K$KM3Mh$7$^$9!#(B
$B:G=i$N(BLisp$B$O(B@w{IBM 704}$B$GF0:n$7$F$$$^$7$?!#(B
$B$3$N7W;;5!$G$O!"%o!<%I$r(B2$B$D$NItJ,!"!XHVCO!Y!J(Baddress$B!KItJ,!"(B
$B!X8:?t!Y!J(Bdecrement$B!KItJ,$H8F$P$l$k$b$N$KJ,$1$F$$$^$7$?!#(B
@sc{car}$B$O%l%8%9%?$NHVCOItJ,$NFbMF!J(BContents of Address Register$B!K$r(B
$B<h$j=P$9L?Na$G$"$j!"(B
@sc{cdr}$B$O%l%8%9%?$N8:?tItJ,$NFbMF!J(BContents of Decrement Register$B!K$r(B
$B<h$j=P$9L?Na$G$7$?!#(B
$B0lJ}!"!X%3%s%9%;%k!Y$H$$$&L>>N$O!"(B
$B$3$l$i$r:n@.$9$k4X?t(B@code{cons}$B$+$i$-$F$$$^$9!#(B
$B$3$N4X?tL>$O!"$=$NL\E*!"%;%k$r:n$k!J(Bconstruction of cells$B!K$+$i$-$F$$$^$9!#(B
@c @cindex atom
@cindex $B%"%H%`(B
@c   Because cons cells are so central to Lisp, we also have a word for
@c ``an object which is not a cons cell''.  These objects are called
@c @dfn{atoms}.
$B%3%s%9%;%k$O(BLisp$B$N3K?4$J$N$G!"(B
$B!X%3%s%9%;%k$G$O$J$$%*%V%8%'%/%H!Y$KBP$9$kL>>N$b$"$j$^$9!#(B
$B$3$l$i$N%*%V%8%'%/%H$r(B@dfn{$B%"%H%`(B}$B!J(Batoms$B!K$H8F$S$^$9!#(B
@c @cindex parenthesis
@cindex $B3g8L(B
@c   The read syntax and printed representation for lists are identical, and
@c consist of a left parenthesis, an arbitrary number of elements, and a
@c right parenthesis.
$B%j%9%H$NF~NO9=J8$HI=<(I=8=$OF10l$G$9!#(B
$B3+$-3g8L$G;O$^$j!"G$0U8D$NMWAG!"JD$83g8L$G=*$($^$9!#(B
@c    Upon reading, each object inside the parentheses becomes an element
@c of the list.  That is, a cons cell is made for each element.  The
@c @sc{car} slot of the cons cell points to the element, and its @sc{cdr}
@c slot points to the next cons cell of the list, which holds the next
@c element in the list.  The @sc{cdr} slot of the last cons cell is set to
@c point to @code{nil}.
$BFI$_<h$j;~$K$O!"3g8L$NFbB&$N3F%*%V%8%'%/%H$,!"(B
$B%j%9%H$N3FMWAG$K$J$j$^$9!#(B
$B$D$^$j!"$3$l$i$NMWAG$+$i$J$k%3%s%9%;%k$r:n$j$^$9!#(B
$B%3%s%9%;%k$N(B@sc{car}$B%9%m%C%H$GMWAG$r;X$7$^$9!#(B
$BF1$8%3%s%9%;%k$N(B@sc{cdr}$B%9%m%C%H$G!"(B
$B%j%9%H>e$N$D$.$NMWAG$rJ];}$7$F$$$k!"(B
$B%j%9%H$N$D$.$N%3%s%9%;%k$r;X$7$^$9!#(B
$B:G8e$N%3%s%9%;%k$N(B@sc{cdr}$B%9%m%C%H$O(B@code{nil}$B$r;X$7$^$9!#(B
@c @cindex box diagrams, for lists
@c @cindex diagrams, boxed, for lists
@cindex $BH"I=<(!"%j%9%H(B
@cindex $B%j%9%H$NH"I=<((B
@cindex $B?^I=<(!"%j%9%H(B
@cindex $B%j%9%H$N?^I=<((B
@c   A list can be illustrated by a diagram in which the cons cells are
@c shown as pairs of boxes, like dominoes.  (The Lisp reader cannot read
@c such an illustration; unlike the textual notation, which can be
@c understood by both humans and computers, the box illustrations can be
@c understood only by humans.)  This picture represents the three-element
@c list @code{(rose violet buttercup)}:
$B%j%9%H$O!"%3%s%9%;%k$r(B1$BBP$NH"$GI=$7$F?^<($G$-$^$9!#(B
$B!J(BLisp$B%j!<%@$,$3$N$h$&$J?^I=<($rFI$`$3$H$O$J$$!#(B
$B?M4V$d7W;;5!$,M}2r$G$-$k%F%-%9%HI=5-$H0c$$!"(B
$BH"$rMQ$$$??^I=<($O?M4V$@$1$,M}2r$G$-$k!#!K(B
$B$D$.$N?^$O!"(B3$B$D$NMWAG$+$i@.$k%j%9%H(B@code{(rose violet buttercup)}$B$rI=$7$^$9!#(B
@example
@group
    --- ---      --- ---      --- ---
   |   |   |--> |   |   |--> |   |   |--> nil
    --- ---      --- ---      --- ---
     |            |            |
     |            |            |
      --> rose     --> violet   --> buttercup
@end group
@end example
@c   In this diagram, each box represents a slot that can point to any Lisp
@c object.  Each pair of boxes represents a cons cell.  Each arrow is a
@c pointer to a Lisp object, either an atom or another cons cell.
$B$3$N?^$G!"3FH"$O!"G$0U$N(BLisp$B%*%V%8%'%/%H$r;X$9$3$H$,$G$-$k%9%m%C%H$rI=$7$^$9!#(B
$BH"$NBP$G%3%s%9%;%k$rI=$7$^$9!#(B
$B3FLp0u$O!"%"%H%`$dB>$N%3%s%9%;%k$G$"$k(BLisp$B%*%V%8%'%/%H$r;X$9%]%$%s%?$G$9!#(B
@c   In this example, the first box, which holds the @sc{car} of the first
@c cons cell, points to or ``contains'' @code{rose} (a symbol).  The second
@c box, holding the @sc{cdr} of the first cons cell, points to the next
@c pair of boxes, the second cons cell.  The @sc{car} of the second cons
@c cell is @code{violet}, and its @sc{cdr} is the third cons cell.  The
@c @sc{cdr} of the third (and last) cons cell is @code{nil}.
$B$3$NNc$G$O!":G=i$N%3%s%9%;%k$N(B@sc{car}$B$rI=$9:G=i$NH"$O!"(B
@code{rose}$B!J%7%s%\%k!K$r;X$7$F$$$^$9!#(B
$B$"$k$$$O!"(B@code{rose}$B!J%7%s%\%k!K$r!X4^$s$G$$$k!Y$H$b$$$$$^$9!#(B
$B:G=i$N%3%s%9%;%k$N(B@sc{cdr}$B$rI=$9(B2$BHVL\$NH"$O!"(B
$B$D$.$N(B1$BBP$NH"!"(B2$BHVL\$N%3%s%9%;%k$r;X$7$F$$$^$9!#(B
2$BHVL\$N%3%s%9%;%k$N(B@sc{car}$B$O(B@code{violet}$B$G$"$j!"(B
$B$3$N%3%s%9%;%k$N(B@sc{cdr}$B$O(B3$BHVL\$N%3%s%9%;%k$G$9!#(B
3$BHVL\$N!J:G8e$N!K%3%s%9%;%k$N(B@sc{cdr}$B$O!"(B@code{nil}$B$G$9!#(B
@c   Here is another diagram of the same list, @code{(rose violet
@c buttercup)}, sketched in a different manner:
$BF1$8%j%9%H(B@code{(rose violet buttercup)}$B$r(B
$BJL$NJ}K!$G?^I=<($9$k$H$D$.$N$h$&$K$J$j$^$9!#(B
@smallexample
@group
 ---------------       ----------------       -------------------
| car   | cdr   |     | car    | cdr   |     | car       | cdr   |
| rose  |   o-------->| violet |   o-------->| buttercup |  nil  |
|       |       |     |        |       |     |           |       |
 ---------------       ----------------       -------------------
@end group
@end smallexample
@c @cindex @samp{(@dots{})} in lists
@c @cindex @code{nil} in lists
@c @cindex empty list
@cindex @samp{(@dots{})}$B!"%j%9%H(B
@cindex $B%j%9%HFb$N(B@samp{(@dots{})}
@cindex @code{nil}$B!"%j%9%H(B
@cindex $B%j%9%HFb$N(B@code{nil}
@cindex $B6u%j%9%H(B
@c   A list with no elements in it is the @dfn{empty list}; it is identical
@c to the symbol @code{nil}.  In other words, @code{nil} is both a symbol
@c and a list.
$BFbIt$KMWAG$r;}$?$J$$%j%9%H$O!"(B@dfn{$B6u%j%9%H(B}$B!J(Bempty list$B!K$G$9!#(B
$B$3$l$O%7%s%\%k(B@code{nil}$B$HF10l$G$9!#(B
$B$$$$$+$($l$P!"(B@code{nil}$B$O%7%s%\%k$G$b$"$j%j%9%H$G$b$"$j$^$9!#(B
@c   Here are examples of lists written in Lisp syntax:
Lisp$B$N9=J8$G=q$-I=$7$?%j%9%H$NNc$r<($7$^$9!#(B
@example
@c (A 2 "A")            ; @r{A list of three elements.}
@c ()                   ; @r{A list of no elements (the empty list).}
@c nil                  ; @r{A list of no elements (the empty list).}
@c ("A ()")             ; @r{A list of one element: the string @code{"A ()"}.}
@c (A ())               ; @r{A list of two elements: @code{A} and the empty list.}
@c (A nil)              ; @r{Equivalent to the previous.}
@c ((A B C))            ; @r{A list of one element}
@c                      ;   @r{(which is a list of three elements).}
(A 2 "A")            ; @r{3$BMWAG$N%j%9%H(B}
()                   ; @r{$BMWAG$r;}$?$J$$%j%9%H!J6u%j%9%H!K(B}
nil                  ; @r{$BMWAG$r;}$?$J$$%j%9%H!J6u%j%9%H!K(B}
("A ()")             ; @r{$BJ8;zNs(B@code{"A ()"}$B$@$1$N(B1$BMWAG$N%j%9%H(B}
(A ())               ; @r{@code{A}$B$H6u%j%9%H$+$i@.$k(B2$BMWAG$N%j%9%H(B}
(A nil)              ; @r{$B>e$HF1$8(B}
((A B C))            ; @r{1$BMWAG$N%j%9%H(B}
                     ;   @r{$B!J$=$NMWAG$O(B3$BMWAG$N%j%9%H!K(B}
@end example
@c   Here is the list @code{(A ())}, or equivalently @code{(A nil)},
@c depicted with boxes and arrows:
$B%j%9%H(B@code{(A ())}$B$d!"$3$l$HF1$8(B@code{(A nil)}$B$r(B
$BH"$HLp0u$G=q$/$H$D$.$N$h$&$K$J$j$^$9!#(B
@example
@group
    --- ---      --- ---
   |   |   |--> |   |   |--> nil
    --- ---      --- ---
     |            |
     |            |
      --> A        --> nil
@end group
@end example
@menu
* Dotted Pair Notation::        An alternative syntax for lists.
* Association List Type::       A specially constructed list.
@end menu
@node Dotted Pair Notation
@comment  node-name,  next,  previous,  up
@c @subsubsection Dotted Pair Notation
@subsubsection $B%I%C%HBP5-K!(B
@c @cindex dotted pair notation
@c @cindex @samp{.} in lists
@cindex $B%I%C%HBP5-K!(B
@cindex @samp{.}$B!"%j%9%H(B
@cindex $B%j%9%HFb$N(B@samp{.}
@c   @dfn{Dotted pair notation} is an alternative syntax for cons cells
@c that represents the @sc{car} and @sc{cdr} explicitly.  In this syntax,
@c @code{(@var{a} .@: @var{b})} stands for a cons cell whose @sc{car} is
@c the object @var{a}, and whose @sc{cdr} is the object @var{b}.  Dotted
@c pair notation is therefore more general than list syntax.  In the dotted
@c pair notation, the list @samp{(1 2 3)} is written as @samp{(1 .  (2 . (3
@c . nil)))}.  For @code{nil}-terminated lists, you can use either
@c notation, but list notation is usually clearer and more convenient.
@c When printing a list, the dotted pair notation is only used if the
@c @sc{cdr} of a cons cell is not a list.
@dfn{$B%I%C%HBP5-K!(B}$B!J(Bdotted pair notation$B!K$H$O!"(B
@sc{car}$B$H(B@sc{cdr}$B$rL@<($7$?%3%s%9%;%k$rI=$9$b$&(B1$B$D$N9=J8$G$9!#(B
$B$3$N9=J8$G$O!"(B@code{(@var{a} .@: @var{b})}$B$G!"(B
@sc{car}$B$,%*%V%8%'%/%H(B@var{a}$B$G$"$j(B
@sc{cdr}$B$,%*%V%8%'%/%H(B@var{b}$B$G$"$k%3%s%9%;%k$rI=$7$^$9!#(B
$B$7$?$,$C$F!"%I%C%HBP5-K!$O!"%j%9%H$N9=J8$h$j$5$i$KHFMQ@-$,$"$j$^$9!#(B
$B%I%C%HBP5-K!$G$O!"%j%9%H(B@samp{(1 2 3)}$B$O!"(B
@samp{(1 .  (2 . (3 . nil)))}$B$H=q$1$^$9!#(B
@code{nil}$B$G=*$k%j%9%H$J$i$P!"$I$A$i$N5-K!$G$b=q$-I=$;$^$9$,!"(B
$B%j%9%H5-K!$N$[$&$,$o$+$j$d$9$/$FJXMx$G$9!#(B
$B%j%9%H$rI=<($9$k$H$-$K$O!"%3%s%9%;%k$N(B@sc{cdr}$B$,%j%9%H0J30$N>l9g$K8B$C$F(B
$B%I%C%HBP5-K!$r;H$$$^$9!#(B
@c   Here's an example using boxes to illustrate dotted pair notation.
@c This example shows the pair @code{(rose . violet)}:
$B%I%C%HBP5-K!$rH"$GI=8=$7$F$_$^$9!#(B
$B$D$.$NNc$O(B@code{(rose . violet)}$B$rI=$7$?$b$N$G$9!#(B
@example
@group
    --- ---
   |   |   |--> violet
    --- ---
     |
     |
      --> rose
@end group
@end example
@c   You can combine dotted pair notation with list notation to represent
@c conveniently a chain of cons cells with a non-@code{nil} final @sc{cdr}.
@c You write a dot after the last element of the list, followed by the
@c @sc{cdr} of the final cons cell.  For example, @code{(rose violet
@c . buttercup)} is equivalent to @code{(rose . (violet . buttercup))}.
@c The object looks like this:
$B:G8e$N(B@sc{cdr}$B$,(B@code{nil}$B0J30$G$"$k$h$&$J%3%s%9%;%k$NO":?$rI=8=$9$k$?$a$K!"(B
$B%j%9%H5-K!$K%I%C%HBP5-K!$rAH$_9g$o$;$k$3$H$b$G$-$^$9!#(B
$B%j%9%H$N:G8e$NMWAG$N$"$H$K%I%C%H$r=q$-!"(B
$BB3$1$F!":G8e$N%3%s%9%;%k$N(B@sc{cdr}$B$r=q$-$^$9!#(B
$B$?$H$($P!"(B@code{(rose violet . buttercup)}$B$O!"(B
@code{(rose . (violet . buttercup))}$B$KEy2A$G$9!#(B
$B$3$N%*%V%8%'%/%H$O$D$.$N$h$&$K$J$j$^$9!#(B
@example
@group
    --- ---      --- ---
   |   |   |--> |   |   |--> buttercup
    --- ---      --- ---
     |            |
     |            |
      --> rose     --> violet
@end group
@end example
@c   The syntax @code{(rose .@: violet .@: buttercup)} is invalid because
@c there is nothing that it could mean.  If anything, it would say to put
@c @code{buttercup} in the @sc{cdr} of a cons cell whose @sc{cdr} is already
@c used for @code{violet}.
@code{(rose .@: violet .@: buttercup)}$B$H$$$&9=J8$OIT@5$G$9!#(B
$B$3$l$,0UL#$9$k$3$H$O$J$K$b$"$j$^$;$s!#(B
$B$?$H$($"$C$?$H$7$F$b!"(B@sc{cdr}$B$r(B@code{violet}$BMQ$K$9$G$K;H$C$F$$$k%3%s%9%;%k$N(B
@sc{cdr}$B$K(B@code{buttercup}$B$rCV$1$H$$$&$3$H$K$J$j$^$9!#(B
@c   The list @code{(rose violet)} is equivalent to @code{(rose . (violet))},
@c and looks like this:
$B%j%9%H(B@code{(rose violet)}$B$O!"(B@code{(rose . (violet))}$B$KEy2A$G$"$j!"(B
$B$D$.$N$h$&$K?^<($G$-$^$9!#(B
@example
@group
    --- ---      --- ---
   |   |   |--> |   |   |--> nil
    --- ---      --- ---
     |            |
     |            |
      --> rose     --> violet
@end group
@end example
@c   Similarly, the three-element list @code{(rose violet buttercup)}
@c is equivalent to @code{(rose . (violet . (buttercup)))}.
$BF1MM$K!"(B3$BMWAG$N%j%9%H(B@code{(rose violet buttercup)}$B$O!"(B
@code{(rose . (violet . (buttercup)))}$B$KEy2A$G$9!#(B
@ifinfo
@c It looks like this:
$B$D$.$N$h$&$K?^<($G$-$^$9!#(B
@example
@group
    --- ---      --- ---      --- ---
   |   |   |--> |   |   |--> |   |   |--> nil
    --- ---      --- ---      --- ---
     |            |            |
     |            |            |
      --> rose     --> violet   --> buttercup
@end group
@end example
@end ifinfo
@node Association List Type
@comment  node-name,  next,  previous,  up
@c @subsubsection Association List Type
@subsubsection $BO"A[%j%9%H7?(B
@c   An @dfn{association list} or @dfn{alist} is a specially-constructed
@c list whose elements are cons cells.  In each element, the @sc{car} is
@c considered a @dfn{key}, and the @sc{cdr} is considered an
@c @dfn{associated value}.  (In some cases, the associated value is stored
@c in the @sc{car} of the @sc{cdr}.)  Association lists are often used as
@c stacks, since it is easy to add or remove associations at the front of
@c the list.
@dfn{$BO"A[%j%9%H(B}$B!J(Bassociation list$B!K!"$9$J$o$A!"(B@dfn{alist}$B$O!"(B
$B3FMWAG$,%3%s%9%;%k$G$"$k$h$&$KFCJL$K9=@.$7$?%j%9%H$N$3$H$G$9!#(B
$B3FMWAG$G$O!"(B@sc{car}$B$r(B@dfn{$B%-!<(B}$B!J(Bkey$B!K$H9M$(!"(B
@sc{cdr}$B$r(B@dfn{$BO"A[CM(B}$B!J(Bassociated value$B!K$H9M$($^$9!#(B
$B!J>l9g$K$h$C$F$O!"O"A[CM$r!"(B@sc{cdr}$B$N(B@sc{car}$B$KJ];}$9$k$3$H$b$"$k!#!K(B
$BO"A[%j%9%H$O%9%?%C%/$H$7$F;H$o$l$k$3$H$,$^$^$"$j$^$9!#(B
$B$H$$$&$N$O!"%j%9%H$N@hF,$KBP1~4X78$rDI2C!?:o=|$9$k$N$,4JC1$@$+$i$G$9!#(B
@c   For example,
$B$?$H$($P!"(B
@example
(setq alist-of-colors
      '((rose . red) (lily . white)  (buttercup . yellow)))
@end example
@noindent
@c sets the variable @code{alist-of-colors} to an alist of three elements.  In the
@c first element, @code{rose} is the key and @code{red} is the value.
$B$O!"JQ?t(B@code{alist-of-colors}$B$K!"(B3$BMWAG$NO"A[%j%9%H$r@_Dj$7$^$9!#(B
$B:G=i$NMWAG$G$O!"(B@code{rose}$B$,%-!<$G$"$j!"(B@code{red}$B$,CM$G$9!#(B
@c   @xref{Association Lists}, for a further explanation of alists and for
@c functions that work on alists.
$BO"A[%j%9%H$H$=$l$i$rA`:n$9$k4X?t$K$D$$$F>\$7$$@bL@$O!"(B
@xref{Association Lists}$B!#(B
@node Array Type
@c @subsection Array Type
@subsection $BG[Ns7?(B
@c   An @dfn{array} is composed of an arbitrary number of slots for
@c pointing to other Lisp objects, arranged in a contiguous block of
@c memory.  Accessing any element of an array takes approximately the same
@c amount of time.  In contrast, accessing an element of a list requires
@c time proportional to the position of the element in the list.  (Elements
@c at the end of a list take longer to access than elements at the
@c beginning of a list.)
@dfn{$BG[Ns(B}$B!J(Barray$B!K$O!"G$0U$N(BLisp$B%*%V%8%'%/%H$r;X$9$?$a$N(B
$BG$0U8D$N%9%m%C%H$+$i@.$j!"%a%b%j$NO"B3$7$?>l=j$K<h$j$^$9!#(B
$BG[Ns$N$I$NMWAG$r;2>H$7$F$b!"$[$\F1$8;~4V$+$+$j$^$9!#(B
$B0lJ}!"%j%9%H$NMWAG$r;2>H$9$k$H$-$K$O!"(B
$B%j%9%HFb$NMWAG$N0LCV$KHfNc$7$?;~4V$,I,MW$G$9!#(B
$B!J%j%9%H$NKvHx$NMWAG$r;2>H$9$k$K$O!"(B
$B%j%9%H$N@hF,$NMWAG$r;2>H$9$k$h$j;~4V$,$+$+$k!#!K(B
@c   Emacs defines four types of array: strings, vectors, bool-vectors, and
@c char-tables.
Emacs$B$K$O!"(B4$B$D$NG[Ns7?!"$D$^$j!"(B
$BJ8;zNs!"%Y%/%H%k!"%V!<%k%Y%/%H%k!"J8;z%F!<%V%k$,$"$j$^$9!#(B
@c   A string is an array of characters and a vector is an array of
@c arbitrary objects.  A bool-vector can hold only @code{t} or @code{nil}.
@c These kinds of array may have any length up to the largest integer.
@c Char-tables are sparse arrays indexed by any valid character code; they
@c can hold arbitrary objects.
$BJ8;zNs$OJ8;z$NG[Ns$G$"$j!"(B
$B%Y%/%H%k$OG$0U$N%*%V%8%'%/%H$NG[Ns$G$9!#(B
$B%V!<%k%Y%/%H%k$O!"(B@code{t}$B$d(B@code{nil}$B$@$1$rJ];}$G$-$^$9!#(B
$B$3$l$i$N<oN`$NG[Ns$O!":GBg$N@0?tCM$^$G$J$i!"G$0U$ND9$5$K$G$-$^$9!#(B
$BJ8;z%F!<%V%k$O!"@5$7$$J8;z%3!<%I$GE:;zIU$1$9$kAB$JG[Ns$G$"$j!"(B
$BG$0U$N%*%V%8%'%/%H$rJ];}$G$-$^$9!#(B
@c   The first element of an array has index zero, the second element has
@c index 1, and so on.  This is called @dfn{zero-origin} indexing.  For
@c example, an array of four elements has indices 0, 1, 2, @w{and 3}.  The
@c largest possible index value is one less than the length of the array.
@c Once an array is created, its length is fixed.
$BG[Ns$N:G=i$NMWAG$O(B0$B$GE:;zIU$1$9$k!"(B
2$BHVL\$NMWAG$O(B1$B$GE:;zIU$1$9$k!"$H$$$&$h$&$K$J$j$^$9!#(B
$B$3$l$r(B@dfn{$B%<%m86E@(B}$B!J(Bzero-origin$B!K$NE:;zIU$1$H8F$S$^$9!#(B
$B$?$H$($P!"(B4$B$D$NMWAG$+$i$J$kG[Ns$NE:;z$O!"(B0$B!"(B1$B!"(B2$B!"(B@w{$B$=$7$F!"(B3}$B$G$9!#(B
$B:GBg$NE:;z$O!"G[Ns$ND9$5$h$j(B1$B$@$1>.$5$/$J$j$^$9!#(B
$B$$$C$?$sG[Ns$r:n@.$9$k$H!"$=$ND9$5$O8GDj$5$l$^$9!#(B
@c   All Emacs Lisp arrays are one-dimensional.  (Most other programming
@c languages support multidimensional arrays, but they are not essential;
@c you can get the same effect with an array of arrays.)  Each type of
@c array has its own read syntax; see the following sections for details.
Emacs Lisp$B$N$9$Y$F$NG[Ns$O(B1$B<!85$G$9!#(B
$B!JB?$/$NB>$N%W%m%0%i%`8@8l$G$OB?<!85G[Ns$r07$($k$,!"(B
$B$=$l$OK\<AE*$G$O$J$$!#(B
$BG[Ns$NG[Ns$r:n$l$PF1$88z2L$rF@$i$l$k!#!K(B
$BG[Ns$N$=$l$>$l$N7?$K1~$8$F!"@lMQ$NF~NO9=J8$,$"$j$^$9!#(B
$B>\$7$/$O!"0J2<$r;2>H$7$F$/$@$5$$!#(B
@c   The array type is contained in the sequence type and
@c contains the string type, the vector type, the bool-vector type, and the
@c char-table type.
$BG[Ns7?$O%7!<%1%s%97?$K4^$^$l!"(B
$BG[Ns7?$O!"J8;z7?!"%Y%/%H%k7?!"%V!<%k%Y%/%H%k7?!"J8;z%F!<%V%k7?$r4^$_$^$9!#(B
@node String Type
@c @subsection String Type
@subsection $BJ8;zNs7?(B
@c   A @dfn{string} is an array of characters.  Strings are used for many
@c purposes in Emacs, as can be expected in a text editor; for example, as
@c the names of Lisp symbols, as messages for the user, and to represent
@c text extracted from buffers.  Strings in Lisp are constants: evaluation
@c of a string returns the same string.
@dfn{$BJ8;zNs(B}$B!J(Bstring$B!K$H$OJ8;z$NG[Ns$G$9!#(B
$B%F%-%9%H%(%G%#%?$H$$$&$3$H$+$iM=A[$5$l$k$h$&$K!"(B
Emacs$B$G$O$5$^$6$^$JL\E*$KJ8;zNs$r;H$$$^$9!#(B
$B$?$H$($P!"(BLisp$B%7%s%\%k$NL>A0$H$7$F!"(B
$B%f!<%6!<$X$N%a%C%;!<%8$H$7$F!"(B
$B%P%C%U%!$+$i<h$j=P$7$?%F%-%9%H$rI=8=$9$k$?$a$J$I$G$9!#(B
Lisp$B$NJ8;zNs$ODj?t$G$9!#(B
$B$D$^$j!"J8;zNs$rI>2A$9$k$HF1$8J8;zNs$K$J$j$^$9!#(B
@c   @xref{Strings and Characters}, for functions that operate on strings.
$BJ8;zNs$rA`:n$9$k4X?t$K$D$$$F$O!"(B@xref{Strings and Characters}$B!#(B
@menu
* Syntax for Strings::
* Non-ASCII in Strings::
* Nonprinting Characters::
* Text Props and Strings::
@end menu
@node Syntax for Strings
@c @subsubsection Syntax for Strings
@subsubsection $BJ8;zNs$N9=J8(B
@c @cindex @samp{"} in strings
@c @cindex double-quote in strings
@c @cindex @samp{\} in strings
@c @cindex backslash in strings
@cindex @samp{"}$B!"J8;zNs(B
@cindex $BJ8;zNs$N(B@samp{"}
@cindex $B%@%V%k%/%)!<%H!"J8;zNs(B
@cindex $BJ8;zNs$N%@%V%k%/%)!<%H(B
@cindex $BFs=E0zMQId!"J8;zNs(B
@cindex $BJ8;zNs$NFs=E0zMQId(B
@cindex @samp{\}$B!"J8;zNs(B
@cindex $BJ8;zNs$N(B@samp{\}
@cindex $B%P%C%/%9%i%C%7%e!"J8;zNs(B
@cindex $BJ8;zNs$N%P%C%/%9%i%C%7%e(B
@c   The read syntax for strings is a double-quote, an arbitrary number of
@c characters, and another double-quote, @code{"like this"}.  To include a
@c double-quote in a string, precede it with a backslash; thus, @code{"\""}
@c is a string containing just a single double-quote character.  Likewise,
@c you can include a backslash by preceding it with another backslash, like
@c this: @code{"this \\ is a single embedded backslash"}.
$BJ8;zNs$NF~NO9=J8$O!"(B@code{"like this"}$B$N$h$&$K!"(B
$B%@%V%k%/%)!<%H$G;O$a$F!"G$0U8D$NJ8;z$r=q$-!"%@%V%k%/%)!<%H$G=*$($^$9!#(B
$BJ8;zNs$NCf$K%@%V%k%/%)!<%H$r4^$a$k$K$O!"(B
$B%P%C%/%9%i%C%7%e$rD>A0$KCV$-$^$9!#(B
$B$D$^$j!"(B@code{"\""}$B$O!"%@%V%k%/%)!<%H(B1$B8D$@$1$+$i@.$kJ8;zNs$G$9!#(B
$BF1MM$K!"%P%C%/%9%i%C%7%e$r4^$a$k$K$O!"(B
@code{"this \\ is a single embedded backslash"}$B$N$h$&$K!"(B
$B%P%C%/%9%i%C%7%e$rD>A0$KCV$-$^$9!#(B
@c @cindex newline in strings
@cindex $B2~9T!"J8;zNs(B
@cindex $BJ8;zNs$N2~9T(B
@c   The newline character is not special in the read syntax for strings;
@c if you write a new line between the double-quotes, it becomes a
@c character in the string.  But an escaped newline---one that is preceded
@c by @samp{\}---does not become part of the string; i.e., the Lisp reader
@c ignores an escaped newline while reading a string.  An escaped space
@c @w{@samp{\ }} is likewise ignored.
$BJ8;zNs$NF~NO9=J8$K$*$$$F!"2~9TJ8;z$OFCJL$G$O$"$j$^$;$s!#(B
$B%@%V%k%/%)!<%H$N$"$$$@$K2~9T$r=q$1$P!"(B
$B2~9T$OJ8;zNs$NJ8;z$K$J$j$^$9!#(B
$B0lJ}!"%(%9%1!<%W$7$?2~9T!"$D$^$j!"(B@samp{\}$B$rD>A0$K=q$/$H!"(B
$BJ8;zNs$N0lIt$K$O$J$j$^$;$s!#(B
$B$9$J$o$A!"(BLisp$B%j!<%@$O!"J8;zNs$rFI$`:]$K%(%9%1!<%W$7$?2~9T$rL5;k$7$^$9!#(B
$B%(%9%1!<%W$7$?6uGr(B@w{@samp{\ }}$B$b!"F1MM$KL5;k$7$^$9!#(B
@example
"It is useful to include newlines
in documentation strings,
but the newline is \
ignored if escaped."
     @result{} "It is useful to include newlines 
in documentation strings, 
but the newline is ignored if escaped."
@end example
@node Non-ASCII in Strings
@c @subsubsection Non-ASCII Characters in Strings
@subsubsection $BJ8;zNsFb$NHs(BASCII$BJ8;z(B
@c   You can include a non-@sc{ASCII} international character in a string
@c constant by writing it literally.  There are two text representations
@c for non-@sc{ASCII} characters in Emacs strings (and in buffers): unibyte
@c and multibyte.  If the string constant is read from a multibyte source,
@c such as a multibyte buffer or string, or a file that would be visited as
@c multibyte, then the character is read as a multibyte character, and that
@c makes the string multibyte.  If the string constant is read from a
@c unibyte source, then the character is read as unibyte and that makes the
@c string unibyte.
$BHs(B@sc{ASCII}$B$G$"$k9q:]2=J8;z$rJ8;zNs$K4^$a$k$K$O!"(B
$B$=$NJ8;z$r$=$N$^$^=q$-$^$9!#(B
Emacs$B$NJ8;zNs!J$*$h$S!"%P%C%U%!!K$G$O!"(B
$BHs(B@sc{ASCII}$B$NI=8=J}K!$,(B2$B$D$"$j$^$9!#(B
$B%f%K%P%$%H$H%^%k%A%P%$%H$G$9!#(B
$B%^%k%A%P%$%H%P%C%U%!$d%^%k%A%P%$%HJ8;zNs!"$"$k$$$O!"(B
$B%^%k%A%P%$%H$H$7$FK,Ld$7$F$$$k%U%!%$%k$J$I$N(B
$B%^%k%A%P%$%H$N%=!<%9$+$iJ8;zNsDj?t$rFI$_<h$k$H$-$K$O!"(B
$BJ8;z$r%^%k%A%P%$%HJ8;z$H$7$FFI$_<h$j!"(B
$B%^%k%A%P%$%HJ8;zNs$K$7$^$9!#(B
$B%f%K%P%$%H$N%=!<%9$+$iJ8;zNsDj?t$rFI$_<h$k$H$-$K$O!"(B
$BJ8;z$r%f%K%P%$%HJ8;z$H$7$FFI$_<h$j!"(B
$BJ8;zNs$O%f%K%P%$%H$K$J$j$^$9!#(B
@c @c ??? Change this?
@c   You can also represent a multibyte non-@sc{ASCII} character with its
@c character code, using a hex escape, @samp{\x@var{nnnnnnn}}, with as many
@c digits as necessary.  (Multibyte non-@sc{ASCII} character codes are all
@c greater than 256.)  Any character which is not a valid hex digit
@c terminates this construct.  If the character that would follow is a hex
@c digit, write @w{@samp{\ }} (backslash and space)
@c to terminate the hex escape---for example,
@c @w{@samp{\x8e0\ }} represents one character, @samp{a} with grave accent.
@c @w{@samp{\ }} in a string constant is just like backslash-newline; it does
@c not contribute any character to the string, but it does terminate the
@c preceding hex escape.
$B%^%k%A%P%$%H$NHs(B@sc{ASCII}$BJ8;z$O!"(B
$BI,MW$J7e?t$N(B16$B?J%(%9%1!<%W(B@samp{\x@var{nnnnnnn}}$B$rMQ$$$F(B
$B=q$/$3$H$b$G$-$^$9!#(B
$B!J%^%k%A%P%$%H$NHs(B@sc{ASCII}$BJ8;z$N%3!<%I$O!"(B256$B$h$jBg$-$$!#!K(B
16$B?J?t;z$H$7$F@5$7$/$J$$J8;z$G(B16$B?J%(%9%1!<%W$r=*C<$7$^$9!#(B
16$B?J?t;z$NJ8;z$,$"$H$KB3$/>l9g$K$O!"(B@w{@samp{\ }}$B!J%P%C%/%9%i%C%7%e$H6uGr!K$H(B
$B=q$$$F(B16$B?J%(%9%1!<%W$r=*C<$7$^$9!#(B
$B$?$H$($P!"(B@w{@samp{\x8e0\ }}$B$O!"%0%l!<%V%"%/%;%s%HIU$-$N(B@samp{a}$B$rI=$7$^$9!#(B
$BJ8;zNsDj?tFb$N(B@w{@samp{\ }}$B$O!"%P%C%/%9%i%C%7%e!\2~9T$HF1$8$G$9!#(B
$BJ8;zNsFb$NJ8;z$K$O4^$^$l$^$;$s$,!"@h9T$9$k(B16$B?J%(%9%1!<%W$r=*$($^$9!#(B
@c   Using a multibyte hex escape forces the string to multibyte.  You can
@c represent a unibyte non-@sc{ASCII} character with its character code,
@c which must be in the range from 128 (0200 octal) to 255 (0377 octal).
@c This forces a unibyte string.
$B%^%k%A%P%$%H$N(B16$B?J%(%9%1!<%W$r;H$&$H!"(B
$BJ8;zNs$O%^%k%A%P%$%H$K$J$j$^$9!#(B
$B%f%K%P%$%H$NHs(B@sc{ASCII}$B$rJ8;z%3!<%I$GI=8=$9$k$3$H$b$G$-$^$9$,!"(B
$BJ8;z%3!<%I$O(B128$B!J(B8$B?J(B0200$B!K$+$i(B255$B!J(B8$B?J(B0377$B!K$NHO0O$G$"$kI,MW$,$"$j$^$9!#(B
$B$3$&$9$k$H!"J8;zNs$O%f%K%P%$%H$K$J$j$^$9!#(B
  
@c   @xref{Text Representations}, for more information about the two
@c text representations.
2$B<oN`$N%F%-%9%H$NI=8=J}K!$K$D$$$F>\$7$/$O!"(B@xref{Text Representations}$B!#(B
@node Nonprinting Characters
@c @subsubsection Nonprinting Characters in Strings
@subsubsection $BJ8;zNsFb$NHs0u;zJ8;z(B
@c   You can use the same backslash escape-sequences in a string constant
@c as in character literals (but do not use the question mark that begins a
@c character constant).  For example, you can write a string containing the
@c nonprinting characters tab and @kbd{C-a}, with commas and spaces between
@c them, like this: @code{"\t, \C-a"}.  @xref{Character Type}, for a
@c description of the read syntax for characters.
$BJ8;zDj?t$HF1$8%P%C%/%9%i%C%7%e$N%(%9%1!<%W%7!<%1%s%9$rJ8;zNsDj?t$G$b(B
$B;H$($^$9!J$?$@$7!"J8;zDj?t$r3+;O$9$k5?LdId$O=q$+$J$$!K!#(B
$B$?$H$($P!"%3%s%^$H6uGr$G6h@Z$C$?Hs0u;zJ8;z$N%?%V$H(B@kbd{C-a}$B$r(B
$B4^$`J8;zNs$r=q$/$K$O!"(B@code{"\t, \C-a"}$B$N$h$&$K$7$^$9!#(B
$BJ8;z$NF~NO9=J8$K$D$$$F$O!"(B@xref{Character Type}$B!#(B
@c   However, not all of the characters you can write with backslash
@c escape-sequences are valid in strings.  The only control characters that
@c a string can hold are the @sc{ASCII} control characters.  Strings do not
@c distinguish case in @sc{ASCII} control characters.
$B$7$+$7$J$,$i!"%P%C%/%9%i%C%7%e$N%(%9%1!<%W%7!<%1%s%9$9$Y$F$,!"(B
$BJ8;zNs$K$*$$$F@5$7$$$H$O8B$j$^$;$s!#(B
$BJ8;zNs$K4^$a$k$3$H$,2DG=$J%3%s%H%m!<%kJ8;z$O!"(B
@sc{ASCII}$B%3%s%H%m!<%kJ8;z$K8B$j$^$9!#(B
$BJ8;zNs$G$O!"(B@sc{ASCII}$B%3%s%H%m!<%kJ8;z$NBgJ8;z>.J8;z$r6hJL$7$^$;$s!#(B
@c   Properly speaking, strings cannot hold meta characters; but when a
@c string is to be used as a key sequence, there is a special convention
@c that provides a way to represent meta versions of @sc{ASCII} characters in a
@c string.  If you use the @samp{\M-} syntax to indicate a meta character
@c in a string constant, this sets the
$B@53N$K$$$($P!"J8;zNs$O%a%?J8;z$rJ];}$G$-$^$;$s!#(B
$B$7$+$7!"J8;zNs$r%-!<Ns$H$7$F;H$&>l9g$K$O!"(B
$BJ8;zNsFb$N(B@sc{ASCII}$BJ8;z$N%a%?JQ<o$rI=8=$9$k$?$a$N(B
$BFCJL$J47=,$,$"$j$^$9!#(B
$BJ8;zNsDj?tFb$G%a%?J8;z$rI=$9$?$a$K(B@samp{\M-}$B$N9=J8$r;H$&$H!"(B
$BJ8;zNsFb$N$=$NJ8;z$K(B
@tex
$2^{7}$
@end tex
@ifinfo
2**7
@end ifinfo
@c bit of the character in the string.  If the string is used in
@c @code{define-key} or @code{lookup-key}, this numeric code is translated
@c into the equivalent meta character.  @xref{Character Type}.
$B$N%S%C%H$r@_Dj$7$^$9!#(B
@code{define-key}$B$d(B@code{lookup-key}$B$KJ8;zNs$r;H$&$H!"(B
$B$3$N%3!<%I$O!"Ey2A$J%a%?J8;z$KJQ49$5$l$^$9!#(B
@xref{Character Type}$B!#(B
@c   Strings cannot hold characters that have the hyper, super, or alt
@c modifiers.
$BJ8;zNs$G$O!"%O%$%Q!<!"%9!<%Q!<!"%"%k%H$N=$>~;R$rJ];}$G$-$^$;$s!#(B
@node Text Props and Strings
@c @subsubsection Text Properties in Strings
@subsubsection $BJ8;zNsFb$N%F%-%9%HB0@-(B
@c   A string can hold properties for the characters it contains, in
@c addition to the characters themselves.  This enables programs that copy
@c text between strings and buffers to copy the text's properties with no
@c special effort.  @xref{Text Properties}, for an explanation of what text
@c properties mean.  Strings with text properties use a special read and
@c print syntax:
$BJ8;zNs$O!"J8;z$=$N$b$N$K2C$($F!"J8;z$NB0@-$bJ];}$G$-$^$9!#(B
$B$3$N$?$a!"FCJL$J$3$H$r$7$J$/$F$b!"(B
$BJ8;zNs$H%P%C%U%!$N$"$$$@$G%F%-%9%H$r%3%T!<$9$k%W%m%0%i%`$O!"(B
$B%F%-%9%HB0@-$r%3%T!<$G$-$^$9!#(B
$B%F%-%9%HB0@-$N0UL#$K$D$$$F$O!"(B@xref{Text Properties}$B!#(B
$B%F%-%9%HB0@-IU$-$NJ8;zNs$K$O!"FCJL$JF~NO9=J8$,$"$j$^$9!#(B
@example
#("@var{characters}" @var{property-data}...)
@end example
@noindent
@c where @var{property-data} consists of zero or more elements, in groups
@c of three as follows:
$B$3$3$G!"(B@var{property-data}$B$O(B0$B8D0J>e$N$D$.$N$h$&$J(B3$B$DAH$_$G$9!#(B
@example
@var{beg} @var{end} @var{plist}
@end example
@noindent
@c The elements @var{beg} and @var{end} are integers, and together specify
@c a range of indices in the string; @var{plist} is the property list for
@c that range.  For example,
3$B$DAH$_$NMWAG!"(B@var{beg}$B$H(B@var{end}$B$O@0?t$G$"$j!"(B
$BJ8;zNsFb$NE:;z$NHO0O$rI=$7$^$9!#(B
@var{plist}$B$O$=$NHO0O$NB0@-%j%9%H$G$9!#(B
$B$?$H$($P!"(B
@example
#("foo bar" 0 3 (face bold) 3 4 nil 4 7 (face italic))
@end example
@noindent
@c represents a string whose textual contents are @samp{foo bar}, in which
@c the first three characters have a @code{face} property with value
@c @code{bold}, and the last three have a @code{face} property with value
@c @code{italic}.  (The fourth character has no text properties, so its
@c property list is @code{nil}.  It is not actually necessary to mention
@c ranges with @code{nil} as the property list, since any characters not
@c mentioned in any range will default to having no properties.)
$B$O!":G=i$N(B3$BJ8;z$,(B@code{face}$BB0@-$H$7$F(B@code{bold}$B$r;}$A!"(B
$B:G8e$N(B3$BJ8;z$,(B@code{face}$BB0@-$H$7$F(B@code{italic}$B$r;}$D!"(B
@samp{foo bar}$B$H$$$&J8;zNs$rI=$7$^$9!#(B
$B!J(B4$BHVL\$NJ8;z$K$O%F%-%9%HB0@-$O$J$/!"$=$NB0@-%j%9%H$O(B@code{nil}$B!#(B
$B%G%U%)%k%H$G$O!"HO0O$K4^$^$l$J$$J8;z$K$OB0@-$O$J$$$N$G!"(B
$BB0@-%j%9%H$,(B@code{nil}$B$G$"$k$h$&$JHO0O$r8@5Z$9$kI,MW$O$J$$!#!K(B
@node Vector Type
@c @subsection Vector Type
@subsection $B%Y%/%H%k7?(B
@c   A @dfn{vector} is a one-dimensional array of elements of any type.  It
@c takes a constant amount of time to access any element of a vector.  (In
@c a list, the access time of an element is proportional to the distance of
@c the element from the beginning of the list.)
@dfn{$B%Y%/%H%k(B}$B!J(Bvector$B!K$O!"G$0U$N7?$NMWAG$+$i@.$k(B1$B<!85G[Ns$G$9!#(B
$B%Y%/%H%k$NG$0U$NMWAG$r;2>H$7$F$b!"$=$l$KI,MW$J;~4V$O0lDj$G$9!#(B
$B!J%j%9%H$G$O!"$"$kMWAG$r;2>H$9$k$?$a$KI,MW$J;~4V$O!"(B
$B%j%9%H$N@hF,$+$i$N5wN%$KHfNc$9$k!#!K(B
@c   The printed representation of a vector consists of a left square
@c bracket, the elements, and a right square bracket.  This is also the
@c read syntax.  Like numbers and strings, vectors are considered constants
@c for evaluation.
$B%Y%/%H%k$NI=<(I=8=$O!"3+$-3Q3g8L!"MWAG!"JD$83Q3g8L$G$9!#(B
$B$3$l$O!"F~NO9=J8$G$b$"$j$^$9!#(B
$B?t$dJ8;zNs$HF1MM$K!"%Y%/%H%k$OI>2A;~$K$ODj?t$G$9!#(B
@example
@c [1 "two" (three)]      ; @r{A vector of three elements.}
[1 "two" (three)]      ; @r{3$BMWAG$N%Y%/%H%k(B}
     @result{} [1 "two" (three)]
@end example
@c   @xref{Vectors}, for functions that work with vectors.
$B%Y%/%H%k$K:nMQ$9$k4X?t$K$D$$$F$O!"(B@xref{Vectors}$B!#(B
@node Char-Table Type
@c @subsection Char-Table Type
@subsection $BJ8;z%F!<%V%k7?(B
@c   A @dfn{char-table} is a one-dimensional array of elements of any type,
@c indexed by character codes.  Char-tables have certain extra features to
@c make them more useful for many jobs that involve assigning information
@c to character codes---for example, a char-table can have a parent to
@c inherit from, a default value, and a small number of extra slots to use for
@c special purposes.  A char-table can also specify a single value for
@c a whole character set.
@dfn{$BJ8;z%F!<%V%k(B}$B!J(Bchar-table$B!K$O!"(B
$BG$0U$N7?$NMWAG$+$i@.$k(B1$B<!85G[Ns$G$"$j!"(B
$BJ8;z%3!<%I$GE:;zIU$1$7$^$9!#(B
$BJ8;z%F!<%V%k$K$O!"J8;z%3!<%I$K>pJs$rM?$($k$?$a$NB?$/$NA`:n$r4JC1$K$9$k(B
$BIU2CE*$J5!G=$,$"$j$^$9!#(B
$B$?$H$($P!"J8;z%F!<%V%k$O!">pJs$r7Q>5$9$k$?$a$N?F!"(B
$B%G%U%)%k%HCM!"FCDjL\E*8~$1$N>/?t$NDI2C%9%m%C%H$r;}$F$^$9!#(B
$BJ8;z%F!<%V%k$G$O!"J8;z=89gA4BN$KBP$7$F(B1$B$D$NCM$r;XDj$9$k$3$H$b$G$-$^$9!#(B
@c   The printed representation of a char-table is like a vector
@c except that there is an extra @samp{#^} at the beginning.
$BJ8;z%F!<%V%k$NI=<(I=8=$O%Y%/%H%k$K;w$F$$$^$9$,!"(B
$B@hF,$K(B@samp{#^}$B$,M>J,$KIU$-$^$9!#(B
@c   @xref{Char-Tables}, for special functions to operate on char-tables.
@c Uses of char-tables include:
$BJ8;z%F!<%V%k$rA`:n$9$kFCJL$N4X?t$K$D$$$F$O!"(B@xref{Char-Tables}$B!#(B
$BJ8;z%F!<%V%k$O$D$.$N$h$&$K;H$$$^$9!#(B
@itemize @bullet
@item
@c Case tables (@pxref{Case Tables}).
$BBgJ8;z>.J8;z%F!<%V%k!J(B@pxref{Case Tables}$B!K!#(B
@item
@c Character category tables (@pxref{Categories}).
$BJ8;z%+%F%4%j%F!<%V%k!J(B@pxref{Categories}$B!K!#(B
@item
@c Display Tables (@pxref{Display Tables}).
$BI=<(%F!<%V%k!J(B@pxref{Display Tables}$B!K!#(B
@item
@c Syntax tables (@pxref{Syntax Tables}).
$B9=J8%F!<%V%k!J(B@pxref{Syntax Tables}$B!K!#(B
@end itemize
@node Bool-Vector Type
@c @subsection Bool-Vector Type
@subsection $B%V!<%k%Y%/%H%k7?(B
@c   A @dfn{bool-vector} is a one-dimensional array of elements that
@c must be @code{t} or @code{nil}.
@dfn{$B%V!<%k%Y%/%H%k(B}$B!J(Bbool-vector$B!K$O!"(B
@code{t}$B$+(B@code{nil}$B$@$1$NMWAG$+$i@.$k(B1$B<!85G[Ns$G$9!#(B
@c   The printed representation of a Bool-vector is like a string, except
@c that it begins with @samp{#&} followed by the length.  The string
@c constant that follows actually specifies the contents of the bool-vector
@c as a bitmap---each ``character'' in the string contains 8 bits, which
@c specify the next 8 elements of the bool-vector (1 stands for @code{t},
@c and 0 for @code{nil}).  The least significant bits of the character 
@c correspond to the lowest indices in the bool-vector.  If the length is not a
@c multiple of 8, the printed representation shows extra elements, but
@c these extras really make no difference.
$B%V!<%k%Y%/%H%k$NI=<(I=8=$OJ8;zNs$K;w$F$$$^$9$,!"(B
@samp{#&}$B$HD9$5$G;O$^$j$^$9!#(B
$B$3$l$KB3$/J8;zNsDj?t$,!"%V!<%k%Y%/%H%k$N<B:]$NFbMF$r(B
$B%S%C%H%^%C%W$GI=$7$^$9!#(B
$B$D$^$j!"J8;zNs$N!X3FJ8;z!Y$O(B8$B%S%C%HD9$N%G!<%?$G$"$j!"(B
$B%V!<%k%Y%/%H%k$N$D$.$N(B8$B8D$NMWAG$rI=$7$^$9(B
$B!J(B1$B$O(B@code{t}$B$rI=$7!"(B0$B$O(B@code{nil}$B$rI=$9!K!#(B
$BJ8;z$N:G2<0L%S%C%H$,!"%V!<%k%Y%/%H%k$N>.$5$$E:;z$KBP1~$7$^$9!#(B
$BD9$5$,(B8$B$NG\?t$G$J$$>l9g$K$O!"(B
$BI=<(I=8=$K$OM>7W$JMWAG$,4^$^$l$^$9$,!"M>7W$JItJ,$K0UL#$O$"$j$^$;$s!#(B
@example
(make-bool-vector 3 t)
     @result{} #&3"\007"
(make-bool-vector 3 nil)
     @result{} #&3"\0"
@c ;; @r{These are equal since only the first 3 bits are used.}
;; @r{$B:G=i$N(B3$B%S%C%H$@$1$r;H$C$F$$$k$N$G!"0J2<$O$9$Y$FF1$8(B}
(equal #&3"\377" #&3"\007")
     @result{} t
@end example
@node Function Type
@c @subsection Function Type
@subsection $B4X?t7?(B
@c   Just as functions in other programming languages are executable,
@c @dfn{Lisp function} objects are pieces of executable code.  However,
@c functions in Lisp are primarily Lisp objects, and only secondarily the
@c text which represents them.  These Lisp objects are lambda expressions:
@c lists whose first element is the symbol @code{lambda} (@pxref{Lambda
@c Expressions}).
$BB>$N%W%m%0%i%`8@8l$N4X?t$,<B9T2DG=$G$"$k$h$&$K!"(B
@dfn{Lisp$B4X?t(B}$B!J(BLisp function$B!K$O<B9T2DG=$J%3!<%I$G$9!#(B
$B$7$+$7$J$,$i!"(BLisp$B$K$*$$$F$O!"4X?t$O4pK\(BLisp$B%*%V%8%'%/%H$G$"$j!"(B
$B$=$N%F%-%9%HI=8=$OI{<!E*$J$b$N$G$9!#(B
$B$3$l$i$N(BLisp$B%*%V%8%'%/%H$O%i%`%@<0$G$9!#(B
$B$D$^$j!"@hF,MWAG$,%7%s%\%k(B@code{lambda}$B$G$"$k%j%9%H$G$9(B
$B!J(B@pxref{Lambda Expressions}$B!K!#(B
@c   In most programming languages, it is impossible to have a function
@c without a name.  In Lisp, a function has no intrinsic name.  A lambda
@c expression is also called an @dfn{anonymous function} (@pxref{Anonymous
@c Functions}).  A named function in Lisp is actually a symbol with a valid
@c function in its function cell (@pxref{Defining Functions}).
$B$[$H$s$I$N%W%m%0%i%`8@8l$G$O!"L>A0$N$J$$4X?t$r=q$/$3$H$OIT2DG=$G$9!#(B
Lisp$B$G$O!"K\<AE*$K$O!"4X?t$KL>A0$O$"$j$^$;$s!#(B
$B%i%`%@<0$N$3$H$r(B@dfn{$BL5L>4X?t(B}$B!J(Banonymous function$B!K$H$b8F$S$^$9(B
$B!J(B@pxref{Anonymous Functions}$B!K!#(B
Lisp$B$K$*$1$kL>A0IU$-4X?t$O!"<B:]$K$O!"(B
$B4X?t%;%k$K@5$7$$4X?t$r<}$a$?%7%s%\%k$G$9(B
$B!J(B@pxref{Defining Functions}$B!K!#(B
@c   Most of the time, functions are called when their names are written in
@c Lisp expressions in Lisp programs.  However, you can construct or obtain
@c a function object at run time and then call it with the primitive
@c functions @code{funcall} and @code{apply}.  @xref{Calling Functions}.
$BB?$/$N>l9g!"(BLisp$B%W%m%0%i%`$N(BLisp$B<0Cf$K4X?tL>$r=q$/$H4X?t$,8F$P$l$^$9!#(B
$B$7$+$7!"<B9T;~$K4X?t%*%V%8%'%/%H$r9=@.$7$?$j<hF@$7$F!"(B
$B4pK\4X?t(B@code{funcall}$B$d(B@code{apply}$B$G!"$=$l$r8F$S=P$9$3$H$,$G$-$^$9!#(B
@xref{Calling Functions}$B!#(B
@node Macro Type
@c @subsection Macro Type
@subsection $B%^%/%m7?(B
@c   A @dfn{Lisp macro} is a user-defined construct that extends the Lisp
@c language.  It is represented as an object much like a function, but with
@c different argument-passing semantics.  A Lisp macro has the form of a
@c list whose first element is the symbol @code{macro} and whose @sc{cdr}
@c is a Lisp function object, including the @code{lambda} symbol.
@dfn{Lisp$B%^%/%m(B}$B!J(BLisp macro$B!K$O!"(B
Lisp$B8@8l$r3HD%$9$k%f!<%6!<Dj5A$N9=B$$G$9!#(B
$B4X?t$K;w$?%*%V%8%'%/%H$GI=8=$7$^$9$,!"0z?tEO$7$N0UL#$O0[$J$j$^$9!#(B
Lisp$B%^%/%m$O!"%j%9%H$N:G=i$NMWAG$,%7%s%\%k(B@code{macro}$B$G$"$j!"(B
$B%j%9%H$N(B@sc{cdr}$B$,(B@code{lambda}$B%7%s%\%k$r(B
$B4^$`(BLisp$B4X?t%*%V%8%'%/%H$G$"$k%U%)!<%`$G$9!#(B
@c   Lisp macro objects are usually defined with the built-in
@c @code{defmacro} function, but any list that begins with @code{macro} is
@c a macro as far as Emacs is concerned.  @xref{Macros}, for an explanation
@c of how to write a macro.
Lisp$B%^%/%m%*%V%8%'%/%H$O!"DL>o!"AH$_9~$_4X?t(B@code{defmacro}$B$G(B
$BDj5A$7$^$9$,!"(B
Emacs$B$K$H$C$F$O!"(B@code{macro}$B$G;O$^$k%j%9%H$O%^%/%m$G$9!#(B
$B%^%/%m$N=q$-J}$N@bL@$O!"(B@xref{Macros}$B!#(B
@c   @strong{Warning}: Lisp macros and keyboard macros (@pxref{Keyboard
@c Macros}) are entirely different things.  When we use the word ``macro''
@c without qualification, we mean a Lisp macro, not a keyboard macro.
@strong{$B7Y9p(B}$B!'(B@code{ }Lisp$B%^%/%m$H%-!<%\!<%I%^%/%m(B
$B!J(B@pxref{Keyboard Macros}$B!K$O!"$^$C$?$/JL$N$b$N$G$9!#(B
$BC1$K!X%^%/%m!Y$H$$$C$?>l9g$K$O!"(BLisp$B%^%/%m$r0UL#$9$k$N$G$"$C$F!"(B
$B%-!<%\!<%I%^%/%m$N$3$H$G$O$"$j$^$;$s!#(B
@node Primitive Function Type
@c @subsection Primitive Function Type
@subsection $B4pK\4X?t7?(B
@c @cindex special forms
@cindex $B%9%Z%7%c%k%U%)!<%`(B
@c   A @dfn{primitive function} is a function callable from Lisp but
@c written in the C programming language.  Primitive functions are also
@c called @dfn{subrs} or @dfn{built-in functions}.  (The word ``subr'' is
@c derived from ``subroutine''.)  Most primitive functions evaluate all
@c their arguments when they are called.  A primitive function that does
@c not evaluate all its arguments is called a @dfn{special form}
@c (@pxref{Special Forms}).@refill
@dfn{$B4pK\4X?t7?(B}$B!J(Bprimitive function$B!K$O!"(B
Lisp$B$+$i8F$S=P$72DG=$J4X?t$G$9$,!"(BC$B8@8l$G=q$$$F$"$j$^$9!#(B
$B4pK\4X?t$N$3$H$r(B@dfn{subr}$B$H$+(B
@dfn{$BAH$_9~$_4X?t(B}$B!J(Bbuilt-in functions$B!K$H$b8F$S$^$9!#(B
$B!J!X(Bsubr$B!Y$O!X(Bsubroutine$B!Y$+$i$-$F$$$k!#!K(B
$B$[$H$s$I$N4pK\4X?t$O!"8F$S=P$9$H$-$K$9$Y$F$N0z?t$rI>2A$7$^$9!#(B
$B0z?t$9$Y$F$rI>2A$7$J$$4pK\4X?t$r(B@dfn{$B%9%Z%7%c%k%U%)!<%`(B}$B!J(Bspecial form$B!K$H(B
$B8F$S$^$9!J(B@pxref{Special Forms}$B!K!#(B
@c   It does not matter to the caller of a function whether the function is
@c primitive.  However, this does matter if you try to redefine a primitive
@c with a function written in Lisp.  The reason is that the primitive
@c function may be called directly from C code.  Calls to the redefined
@c function from Lisp will use the new definition, but calls from C code
@c may still use the built-in definition.  Therefore, @strong{we discourage
@c redefinition of primitive functions}.
$B4X?t$r8F$S=P$9B&$+$i$9$l$P!"4X?t$,4pK\4X?t$+$I$&$+$O4X78$"$j$^$;$s!#(B
$B$7$+$7!"(BLisp$B$G=q$$$?4X?t$G4pK\4X?t$r:FDj5A$7$h$&$H$9$k$H!"(B
$BLdBj$,$"$j$^$9!#(B
$B$H$$$&$N$O!"4pK\4X?t$O(BC$B$N%3!<%I$+$iD>@\8F$P$l$k$+$i$G$9!#(B
$B:FDj5A$7$?4X?t$r(BLisp$B$+$i8F$S=P$9>l9g$K$O?7$7$$Dj5A$r;H$$$^$9$,!"(B
C$B$N%3!<%I$OAH$_9~$_$NDj5A$r;H$$B3$1$k$G$7$g$&!#(B
$B$7$?$,$C$F!"(B@strong{$B4pK\4X?t$r:FDj5A$7$J$$$G$/$@$5$$(B}$B!#(B
@c   The term @dfn{function} refers to all Emacs functions, whether written
@c in Lisp or C.  @xref{Function Type}, for information about the
@c functions written in Lisp.
@dfn{$B4X?t(B}$B!J(Bfunction$B!K$H$$$&MQ8l$G!"(B
Lisp$B$d(BC$B$G=q$+$l$?(BEmacs$B$N$9$Y$F$N4X?t$r;X$7$^$9!#(B
Lisp$B$G=q$$$?4X?t$K4X$7$F$O!"(B@xref{Function Type}$B!#(B
@c   Primitive functions have no read syntax and print in hash notation
@c with the name of the subroutine.
$B4pK\4X?t$K$OF~NO9=J8$O$J$/!"(B
$B%5%V%k!<%F%#%sL>$r4^$`%O%C%7%e5-K!$GI=<($7$^$9!#(B
@example
@group
@c (symbol-function 'car)          ; @r{Access the function cell}
@c                                 ;   @r{of the symbol.}
(symbol-function 'car)          ; @r{$B%7%s%\%k$N4X?t%;%k$r;2>H$9$k(B}
     @result{} #<subr car>
@c (subrp (symbol-function 'car))  ; @r{Is this a primitive function?}
@c      @result{} t                       ; @r{Yes.}
(subrp (symbol-function 'car))  ; @r{$B4pK\4X?t$+!)(B}
     @result{} t                       ; @r{$B$=$N$H$*$j(B}
@end group
@end example
@node Byte-Code Type
@c @subsection Byte-Code Function Type
@subsection $B%P%$%H%3!<%I4X?t7?(B
@c The byte compiler produces @dfn{byte-code function objects}.
@c Internally, a byte-code function object is much like a vector; however,
@c the evaluator handles this data type specially when it appears as a
@c function to be called.  @xref{Byte Compilation}, for information about
@c the byte compiler.
$B%P%$%H%3%s%Q%$%i$O!"(B@dfn{$B%P%$%H%3!<%I4X?t%*%V%8%'%/%H(B}
$B!J(Bbyte-code function objects$B!K$r:n$j=P$7$^$9!#(B
$BFbItE*$K$O!"%P%$%H%3!<%I4X?t%*%V%8%'%/%H$O%Y%/%H%k$K$h$/;w$F$$$^$9!#(B
$B$7$+$7$J$,$i!"I>2A2aDx$K$*$$$F$O!"4X?t8F$S=P$7$N$h$&$K8+$($k$H$-$K$O!"(B
$B$3$N%G!<%?7?$rFCJL$K07$$$^$9!#(B
$B%P%$%H%3%s%Q%$%i$K$D$$$F$O!"(B@xref{Byte Compilation}$B!#(B
@c The printed representation and read syntax for a byte-code function
@c object is like that for a vector, with an additional @samp{#} before the
@c opening @samp{[}.
$B%P%$%H%3!<%I4X?t%*%V%8%'%/%H$NI=<(I=8=$HF~NO9=J8$O!"(B
$B%Y%/%H%k$K;w$F$$$^$9$,!"3+$-3Q3g8L(B@samp{[}$B$N$^$($K(B@samp{#}$B$,IU$-$^$9!#(B
@node Autoload Type
@c @subsection Autoload Type
@subsection $B<+F0%m!<%I7?(B
@c   An @dfn{autoload object} is a list whose first element is the symbol
@c @code{autoload}.  It is stored as the function definition of a symbol as
@c a placeholder for the real definition; it says that the real definition
@c is found in a file of Lisp code that should be loaded when necessary.
@c The autoload object contains the name of the file, plus some other
@c information about the real definition.
@dfn{$B<+F0%m!<%I%*%V%8%'%/%H(B}$B!J(Bautoload object$B!K$O!"(B
$B@hF,MWAG$,%7%s%\%k(B@code{autoload}$B$G$"$k%j%9%H$G$9!#(B
$B<B:]$NDj5A$N$+$o$j$K%7%s%\%k$N4X?tDj5A$H$7$F;H$o$l!"(B
$BI,MW$J$H$-$K%m!<%I$9$Y$-<B:]$NDj5A$r<}$a$?(BLisp$B%3!<%I%U%!%$%k$r<($7$^$9!#(B
$B<+F0%m!<%I%*%V%8%'%/%H$K$O!"%U%!%$%kL>$K2C$($F!"(B
$B<B:]$N4X?tDj5A$K4X$9$kB>$N>pJs$bF~$C$F$$$^$9!#(B
@c   After the file has been loaded, the symbol should have a new function
@c definition that is not an autoload object.  The new definition is then
@c called as if it had been there to begin with.  From the user's point of
@c view, the function call works as expected, using the function definition
@c in the loaded file.
$B%U%!%$%k$r%m!<%I$7=*$($k$H!"(B
$B%7%s%\%k$K$O!"<+F0%m!<%I%*%V%8%'%/%H$G$O$J$$?7$?$J4X?tDj5A$,F~$j$^$9!#(B
$B$3$N?7$?$JDj5A$r;O$a$+$i$"$C$?$+$N$h$&$K8F$S=P$7$^$9!#(B
$B%f!<%6!<$N;kE@$+$i$O!"%m!<%I$7$?%U%!%$%kFb$N4X?tDj5A$r;H$C$F!"(B
$BM=A[$I$*$j$K4X?t8F$S=P$7$,9T$o$l$^$9!#(B
@c   An autoload object is usually created with the function
@c @code{autoload}, which stores the object in the function cell of a
@c symbol.  @xref{Autoload}, for more details.
$B<+F0%m!<%I%*%V%8%'%/%H$O!"IaDL!"4X?t(B@code{autoload}$B$G:n$j$^$9!#(B
$B$3$N4X?t$O!"%7%s%\%k$N4X?t%;%k$K%*%V%8%'%/%H$r3JG<$7$^$9!#(B
$B$h$j>\$7$/$O!"(B@xref{Autoload}$B!#(B
@node Editing Types
@c @section Editing Types
@section $BJT=88~$1$N7?(B
@c @cindex editing types
@cindex $BJT=88~$1$N7?(B
@cindex $B7?!"JT=88~$1(B
@c   The types in the previous section are used for general programming
@c purposes, and most of them are common to most Lisp dialects.  Emacs Lisp
@c provides several additional data types for purposes connected with
@c editing.
$BA0@a$N7?$O0lHL$N%W%m%0%i%`8~$1$K;H$&$b$N$G!"(B
$B$=$N$[$H$s$I$O!"$[$s$I$N(BLisp$BJ}8@$K6&DL$7$F$$$^$9!#(B
Emacs Lisp$B$K$O!"JT=8$K4XO"$7$?L\E*8~$1$K$$$/$D$+$N%G!<%?7?$,$"$j$^$9!#(B
@menu
* Buffer Type::         The basic object of editing.
* Marker Type::         A position in a buffer.
* Window Type::         Buffers are displayed in windows.
* Frame Type::		Windows subdivide frames.
* Window Configuration Type::   Recording the way a frame is subdivided.
* Frame Configuration Type::    Recording the status of all frames.
* Process Type::        A process running on the underlying OS.
* Stream Type::         Receive or send characters.
* Keymap Type::         What function a keystroke invokes.
* Overlay Type::        How an overlay is represented.
@end menu
@node Buffer Type
@c @subsection Buffer Type
@subsection $B%P%C%U%!7?(B
@c   A @dfn{buffer} is an object that holds text that can be edited
@c (@pxref{Buffers}).  Most buffers hold the contents of a disk file
@c (@pxref{Files}) so they can be edited, but some are used for other
@c purposes.  Most buffers are also meant to be seen by the user, and
@c therefore displayed, at some time, in a window (@pxref{Windows}).  But a
@c buffer need not be displayed in any window.
@dfn{$B%P%C%U%!(B}$B!J(Bbuffer$B!K$O!"JT=82DG=$J%F%-%9%H$rJ];}$9$k%*%V%8%'%/%H$G$9(B
$B!J(B@pxref{Buffers}$B!K!#(B
$B$[$H$s$I$N%P%C%U%!$O!"%G%#%9%/%U%!%$%k!J(B@pxref{Files}$B!K$NFbMF$rJ];}$7$F(B
$BJT=8$G$-$k$h$&$K$7$^$9$,!"B>$NL\E*$K;H$o$l$k$b$N$b$"$j$^$9!#(B
$B$[$H$s$I$N%P%C%U%!$O!"%f!<%6!<$,8+$k$?$a$N$b$N$G$"$j!"(B
$B$"$k4|4V!"%&%#%s%I%&!J(B@pxref{Windows}$B!K$KI=<($5$l$^$9!#(B
$B$7$+$7!"%P%C%U%!$,$$$:$l$+$N%&%#%s%I%&$KI,$:$7$bI=<($5$l$kI,MW$O$"$j$^$;$s!#(B
@c   The contents of a buffer are much like a string, but buffers are not
@c used like strings in Emacs Lisp, and the available operations are
@c different.  For example, you can insert text efficiently into an
@c existing buffer, whereas ``inserting'' text into a string requires
@c concatenating substrings, and the result is an entirely new string
@c object.
$B%P%C%U%!$NFbMF$OJ8;zNs$K$h$/;w$F$$$^$9$,!"(B
Emacs Lisp$B$K$*$$$F$O!"%P%C%U%!$OJ8;zNs$N$h$&$K$O;H$o$l$:!"(B
$BE,MQ2DG=$JA`:n$b0[$J$j$^$9!#(B
$B$?$H$($P!"4{B8$N%P%C%U%!$K%F%-%9%H$r8zN($h$/A^F~$G$-$^$9$,!"(B
$BJ8;zNs$K%F%-%9%H$r!XA^F~!Y$9$k$K$O!"(B
$BItJ,J8;zNs$rO"7k$9$kI,MW$,$"$j!"$^$C$?$/?7$7$$J8;zNs%*%V%8%'%/%H$K$J$j$^$9!#(B
@c   Each buffer has a designated position called @dfn{point}
@c (@pxref{Positions}).  At any time, one buffer is the @dfn{current
@c buffer}.  Most editing commands act on the contents of the current
@c buffer in the neighborhood of point.  Many of the standard Emacs
@c functions manipulate or test the characters in the current buffer; a
@c whole chapter in this manual is devoted to describing these functions
@c (@pxref{Text}).
$B3F%P%C%U%!$K$O!"(B@dfn{$B%]%$%s%H(B}$B!J(Bpoint$B!K$H8F$P$l$kFCJL$J2U=j$,$"$j$^$9(B
$B!J(B@pxref{Positions}$B!K!#(B
$B$I$s$J$H$-$K$b!"(B1$B$D$N%P%C%U%!$,(B@dfn{$B%+%l%s%H%P%C%U%!(B}$B!J(Bcurrent buffer$B!K$G$9!#(B
$B$[$H$s$I$NJT=8%3%^%s%I$O!"%+%l%s%H%P%C%U%!$N%]%$%s%HIU6a$NFbMF$K:nMQ$7$^$9!#(B
$BB?$/$N(BEmacs$B$NI8=`4X?t$O!"%+%l%s%H%P%C%U%!Fb$K$"$kJ8;z$rA`:n$7$?$j8!::$7$^$9!#(B
$BK\=q$K$O!"$3$l$i$N4X?t$N@bL@$K$"$F$?>O$,(B1$B$D$"$j$^$9!J(B@pxref{Text}$B!K!#(B
@c   Several other data structures are associated with each buffer:
$B3F%P%C%U%!$K4XO"IU$1$i$l$?%G!<%?9=B$$K$O!"$D$.$N$b$N$,$"$j$^$9!#(B
@itemize @bullet
@item
@c a local syntax table (@pxref{Syntax Tables});
$B%m!<%+%k9=J8%F!<%V%k!J(B@pxref{Syntax Tables}$B!K(B
@item
@c a local keymap (@pxref{Keymaps}); and,
$B%m!<%+%k%-!<%^%C%W!J(B@pxref{Keymaps}$B!K!#(B
$B$*$h$S(B
@item
@c a list of buffer-local variable bindings (@pxref{Buffer-Local Variables}).
$B%P%C%U%!$K%m!<%+%k$JJQ?tB+G{%j%9%H!J(B@pxref{Buffer-Local Variables}$B!K!#(B
@item
@c overlays (@pxref{Overlays}).
$B%*!<%P%l%$!J(B@pxref{Overlays}$B!K!#(B
@item
@c text properties for the text in the buffer (@pxref{Text Properties}).
$B%P%C%U%!Fb$N%F%-%9%H$N%F%-%9%HB0@-!J(B@pxref{Text Properties}$B!K!#(B
@end itemize
@noindent
@c The local keymap and variable list contain entries that individually
@c override global bindings or values.  These are used to customize the
@c behavior of programs in different buffers, without actually changing the
@c programs.
$B%m!<%+%k%-!<%^%C%W$HJQ?t%j%9%H$K$O!"(B
$B$=$l$>$l!"%0%m!<%P%k$JB+G{$dCM$KM%@h$9$k$b$N$,F~$C$F$$$^$9!#(B
$B$3$l$i$O!"%W%m%0%i%`$rJQ99$;$:$K!"3F%P%C%U%!$4$H$K!"(B
$B%W%m%0%i%`$N$U$k$^$$$r%+%9%?%^%$%:$9$k$?$a$K;H$o$l$^$9!#(B
@c   A buffer may be @dfn{indirect}, which means it shares the text
@c of another buffer, but presents it differently.  @xref{Indirect Buffers}.
$B%P%C%U%!$O(B@dfn{$B4V@\(B}$B!J(Bindirect$B!K$G$b$h$/!"$=$N>l9g!"(B
$BJL$N%P%C%U%!$H%F%-%9%H$r6&M-$7$D$D0[$J$C$?I=<($r9T$($^$9!#(B
@xref{Indirect Buffers}$B!#(B
@c   Buffers have no read syntax.  They print in hash notation, showing the
@c buffer name.
$B%P%C%U%!$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$B%P%C%U%!L>$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
@example
@group
(current-buffer)
     @result{} #<buffer objects.texi>
@end group
@end example
@node Marker Type
@c @subsection Marker Type
@subsection $B%^!<%+7?(B
@c   A @dfn{marker} denotes a position in a specific buffer.  Markers
@c therefore have two components: one for the buffer, and one for the
@c position.  Changes in the buffer's text automatically relocate the
@c position value as necessary to ensure that the marker always points
@c between the same two characters in the buffer.
@dfn{$B%^!<%+(B}$B!J(Bmarker$B!K$O!"FCDj$N%P%C%U%!Fb$N0LCV$rI=$7$^$9!#(B
$B$7$?$,$C$F!"%^!<%+$K$O(B2$B$D$N9=@.MWAG!"$D$^$j!"(B
$B%P%C%U%!$r<($9$b$N$H0LCV$r<($9$b$N$,$"$j$^$9!#(B
$B%P%C%U%!Fb$N%F%-%9%H$rJQ99$9$k$H!"(B
$B%^!<%+$,%P%C%U%!Fb$NF1$8(B2$B$D$NJ8;z$N$"$$$@$r$D$M$K;X$9$3$H$rJ]>Z$9$k$h$&$K!"(B
$B0LCV$NCM$r99?7$7$^$9!#(B
@c   Markers have no read syntax.  They print in hash notation, giving the
@c current character position and the name of the buffer.
$B%^!<%+$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$B%P%C%U%!Fb$NJ8;z0LCV$H%P%C%U%!L>$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
@example
@group
(point-marker)
     @result{} #<marker at 10779 in objects.texi>
@end group
@end example
@c @xref{Markers}, for information on how to test, create, copy, and move
@c markers.
$B%^!<%+$N8!::!":n@.!"%3%T!<!"0\F0$NJ}K!$K$D$$$F$O!"(B@xref{Markers}$B!#(B
@node Window Type
@c @subsection Window Type
@subsection $B%&%#%s%I%&7?(B
@c   A @dfn{window} describes the portion of the terminal screen that Emacs
@c uses to display a buffer.  Every window has one associated buffer, whose
@c contents appear in the window.  By contrast, a given buffer may appear
@c in one window, no window, or several windows.
@dfn{$B%&%#%s%I%&(B}$B!J(Bwindow$B!K$O!"(B
Emacs$B$,%P%C%U%!$rI=<($9$k$?$a$K;HMQ$9$kC<Kv2hLL$NItJ,$N$3$H$G$9!#(B
$B3F%&%#%s%I%&$K$O!"BP1~IU$1$i$l$?%P%C%U%!$,(B1$B$D$"$j!"(B
$B$=$N%P%C%U%!$NFbMF$r%&%#%s%I%&$KI=<($7$F$$$^$9!#(B
$B0lJ}!"$"$k%P%C%U%!$,!"(B1$B$D$N%&%#%s%I%&$dJ#?t$N%&%#%s%I%&$KI=<($5$l$k$3$H$b$"$j!"(B
$B$I$N%&%#%s%I%&$K$bI=<($5$l$J$$$3$H$b$"$j$^$9!#(B
@c   Though many windows may exist simultaneously, at any time one window
@c is designated the @dfn{selected window}.  This is the window where the
@c cursor is (usually) displayed when Emacs is ready for a command.  The
@c selected window usually displays the current buffer, but this is not
@c necessarily the case.
$BF1;~$KJ#?t$N%&%#%s%I%&$,B8:_$G$-$^$9$,!"(B
$B$I$s$J$H$-$K$b(B1$B$D$N%&%#%s%I%&$@$1$,(B@dfn{$BA*Br$5$l$?%&%#%s%I%&(B}
$B!J(Bselected window$B!K$G$9!#(B
$B$3$l$O!"(BEmacs$B$,%3%^%s%I$r<u$1IU$12DG=$J$H$-$K%+!<%=%k$r!JDL>o!KI=<($9$k(B
$B%&%#%s%I%&$G$9!#(B
$BA*Br$5$l$?%&%#%s%I%&$O!"DL>o!"%+%l%s%H%P%C%U%!$rI=<($7$^$9$,!"(B
$B$3$l$OI,?\$G$O$"$j$^$;$s!#(B
@c   Windows are grouped on the screen into frames; each window belongs to
@c one and only one frame.  @xref{Frame Type}.
$B2hLL>e$N%&%#%s%I%&$O%U%l!<%`$K$^$H$a$i$l$F$$$^$9!#(B
$B3F%&%#%s%I%&$O!"$?$C$?(B1$B$D$N%U%l!<%`$KB0$7$^$9!#(B
@xref{Frame Type}$B!#(B
@c   Windows have no read syntax.  They print in hash notation, giving the
@c window number and the name of the buffer being displayed.  The window
@c numbers exist to identify windows uniquely, since the buffer displayed
@c in any given window can change frequently.
$B%&%#%s%I%&$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$B%&%#%s%I%&HV9f$HI=<(Cf$N%P%C%U%!L>$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
$B%&%#%s%I%&HV9f$O!"%&%#%s%I%&$r0l0U$K<1JL$9$k$?$a$K$"$j$^$9!#(B
$B$3$l$O!"%&%#%s%I%&$,I=<($7$F$$$k%P%C%U%!$OIQHK$KJQ$o$k$+$i$G$9!#(B
@example
@group
(selected-window)
     @result{} #<window 1 on objects.texi>
@end group
@end example
@c   @xref{Windows}, for a description of the functions that work on windows.
$B%&%#%s%I%&$rA`:n$9$k4X?t$N@bL@$O!"(B@xref{Windows}$B!#(B
@node Frame Type
@c @subsection Frame Type
@subsection $B%U%l!<%`7?(B
@c   A @dfn{frame} is a rectangle on the screen that contains one or more
@c Emacs windows.  A frame initially contains a single main window (plus
@c perhaps a minibuffer window) which you can subdivide vertically or
@c horizontally into smaller windows.
@dfn{$B%U%l!<%`(B}$B!J(Bframe$B!K$O!"2hLL>e$N6k7ANN0h$G$"$C$F!"(B
1$B$D0J>e$N(BEmacs$B%&%#%s%I%&$r4^$_$^$9!#(B
$B%U%l!<%`$K$O:G=i$O(B1$B$D$N%&%#%s%I%&(B
$B!J$H%_%K%P%C%U%!%&%#%s%I%&!K$,4^$^$l$^$9$,!"(B
$B$3$l$r:81&$d>e2<$K>.$5$J%&%#%s%I%&$KJ,3d$G$-$^$9!#(B
@c   Frames have no read syntax.  They print in hash notation, giving the
@c frame's title, plus its address in core (useful to identify the frame
@c uniquely).
$B%U%l!<%`$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$B%U%l!<%`$N%?%$%H%k$H%a%b%jFb$N%"%I%l%9(B
$B!J%U%l!<%`$r0l0U$K<1JL$9$k$N$KM-MQ!K$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
@example
@group
(selected-frame)
     @result{} #<frame emacs@@psilocin.gnu.org 0xdac80>
@end group
@end example
@c   @xref{Frames}, for a description of the functions that work on frames.
$B%U%l!<%`$rA`:n$9$k4X?t$N@bL@$O!"(B@xref{Frames}$B!#(B
@node Window Configuration Type
@c @subsection Window Configuration Type
@subsection $B%&%#%s%I%&9=@.7?(B
@c @cindex screen layout
@cindex $B2hLLG[CV(B
@c   A @dfn{window configuration} stores information about the positions,
@c sizes, and contents of the windows in a frame, so you can recreate the
@c same arrangement of windows later.
@dfn{$B%&%#%s%I%&9=@.(B}$B!J(Bwindow configuration$B!K$O!"(B
$B%U%l!<%`Fb$N%&%#%s%I%&$N0LCV!?%5%$%:!?FbMF$K4X$9$k>pJs$r5-O?$7!"(B
$BF1$8G[CV$N%&%#%s%I%&$r$"$H$G:FEY:n@.$G$-$k$h$&$K$7$^$9!#(B
@c   Window configurations do not have a read syntax; their print syntax
@c looks like @samp{#<window-configuration>}.  @xref{Window
@c Configurations}, for a description of several functions related to
@c window configurations.
$B%&%#%s%I%&9=@.$K$OF~NO9=J8$O$"$j$^$;$s!#(B
$BI=<(I=8=$O!"(B@samp{#<window-configuration>}$B$N$h$&$K$J$j$^$9!#(B
$B%&%#%s%I%&9=@.$K4XO"$7$?4X?t$N@bL@$O!"(B@xref{Window Configurations}$B!#(B
@node Frame Configuration Type
@c @subsection Frame Configuration Type
@subsection $B%U%l!<%`9=@.7?(B
@c @cindex screen layout
@cindex $B2hLLG[CV(B
@c   A @dfn{frame configuration} stores information about the positions,
@c sizes, and contents of the windows in all frames.  It is actually
@c a list whose @sc{car} is @code{frame-configuration} and whose
@c @sc{cdr} is an alist.  Each alist element describes one frame,
@c which appears as the @sc{car} of that element.
@dfn{$B%U%l!<%`9=@.(B}$B!J(Bframe configuration$B!K$O!"(B
$B$9$Y$F$N%U%l!<%`$N%&%#%s%I%&$N0LCV!?%5%$%:!?FbMF$K4X$9$k>pJs$N5-O?$G$9!#(B
$B$3$l$O!"<B:]$K$O!"%j%9%H$N(B@sc{car}$B$,(B@code{frame-configuration}$B$G$"$j!"(B
$B%j%9%H$N(B@sc{cdr}$B$,O"A[%j%9%H$G$"$k%j%9%H$G$9!#(B
$BO"A[%j%9%H$N3FMWAG$G!"$=$N(B@sc{car}$B$K8=$l$k%U%l!<%`(B1$B8D$r5-=R$7$^$9!#(B
@c   @xref{Frame Configurations}, for a description of several functions
@c related to frame configurations.
$B%U%l!<%`9=@.$K4XO"$7$?4X?t$N@bL@$O!"(B@xref{Frame Configurations}$B!#(B
@node Process Type
@c @subsection Process Type
@subsection $B%W%m%;%97?(B
@c   The word @dfn{process} usually means a running program.  Emacs itself
@c runs in a process of this sort.  However, in Emacs Lisp, a process is a
@c Lisp object that designates a subprocess created by the Emacs process.
@c Programs such as shells, GDB, ftp, and compilers, running in
@c subprocesses of Emacs, extend the capabilities of Emacs.
$BC18l(B@dfn{$B%W%m%;%9(B}$B!J(Bprocess$B!K$O!"DL>o!"<B9TCf$N%W%m%0%i%`$r0UL#$7$^$9!#(B
Emacs$B<+?H!"$3$N<o$N%W%m%;%9$H$7$F<B9T$5$l$F$$$^$9!#(B
$B$7$+$7!"(BEmacs Lisp$B$G$O!"%W%m%;%9$H$O!"(B
Emacs$B%W%m%;%9$,:n@.$7$?%5%V%W%m%;%9$rI=$9(BLisp$B%*%V%8%'%/%H$N$3$H$G$9!#(B
Emacs$B$N%5%V%W%m%;%9$G<B9T$5$l$k!"%7%'%k!"(BGDB$B!"(Bftp$B!"%3%s%Q%$%i$J$I$N(B
$B%W%m%0%i%`$O!"(BEmacs$B$NG=NO$r3HD%$7$^$9!#(B
@c   An Emacs subprocess takes textual input from Emacs and returns textual
@c output to Emacs for further manipulation.  Emacs can also send signals
@c to the subprocess.
Emacs$B%5%V%W%m%;%9$O!"(BEmacs$B$+$i%F%-%9%HF~NO$r<u$1<h$j!"(B
$B$5$i$K=hM}$G$-$k$h$&$K(BEmacs$B$K%F%-%9%H=PNO$rJV$7$^$9!#(B
Emacs$B$O%5%V%W%m%;%9$K%7%0%J%k$rAw$k$3$H$b$G$-$^$9!#(B
@c   Process objects have no read syntax.  They print in hash notation,
@c giving the name of the process:
$B%W%m%;%9%*%V%8%'%/%H$KF~NO9=J8$O$"$j$^$;$s!#(B
$B%W%m%;%9L>$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
@example
@group
(process-list)
     @result{} (#<process shell>)
@end group
@end example
@c @xref{Processes}, for information about functions that create, delete,
@c return information about, send input or signals to, and receive output
@c from processes.
$B%W%m%;%9$r:n@.$7$?$j:o=|$7$?$j!"%W%m%;%9$K4X$9$k>pJs$rJV$7$?$j!"(B
$B%W%m%;%9$XF~NO$d%7%0%J%k$rAw$C$?$j!"%W%m%;%9$+$i=PNO$r<u$1<h$k(B
$B4X?t$K4X$9$k>pJs$O!"(B@xref{Processes}$B!#(B
@node Stream Type
@c @subsection Stream Type
@subsection $B%9%H%j!<%`7?(B
@c   A @dfn{stream} is an object that can be used as a source or sink for
@c characters---either to supply characters for input or to accept them as
@c output.  Many different types can be used this way: markers, buffers,
@c strings, and functions.  Most often, input streams (character sources)
@c obtain characters from the keyboard, a buffer, or a file, and output
@c streams (character sinks) send characters to a buffer, such as a
@c @file{*Help*} buffer, or to the echo area.
@dfn{$B%9%H%j!<%`(B}$B!J(Bstream$B!K$O!"J8;z$r=P$7F~$l$9$kBP>]!"(B
$B$D$^$j!"F~NOMQ$KJ8;z$r6!5k$7$?$j!"=PNO$H$7$FJ8;z$r<u$1<h$C$?$j$H$$$C$?(B
$B$3$H$K;H$($k%*%V%8%'%/%H$G$9!#(B
$BB?$/$N0[$J$k7?$r$3$N$h$&$K;H$($^$9!#(B
$B%^!<%+!"%P%C%U%!!"J8;zNs!"4X?t$G$9!#(B
$B$[$H$s$I$N>l9g!"F~NO%9%H%j!<%`!JJ8;z$N6!5k8;!K$O!"(B
$B%-!<%\!<%I!"%P%C%U%!!"%U%!%$%k$+$iJ8;z$r<hF@$7$^$9!#(B
$B=PNO%9%H%j!<%`!JJ8;z$N>CHq@h!K$O!"(B@file{*Help*}$B%P%C%U%!$J$I$N%P%C%U%!$d(B
$B%(%3!<NN0h$KJ8;z$rAw$j$^$9!#(B
@c   The object @code{nil}, in addition to its other meanings, may be used
@c as a stream.  It stands for the value of the variable
@c @code{standard-input} or @code{standard-output}.  Also, the object
@c @code{t} as a stream specifies input using the minibuffer
@c (@pxref{Minibuffers}) or output in the echo area (@pxref{The Echo
@c Area}).
$B%*%V%8%'%/%H(B@code{nil}$B$O!"B>$N0UL#$K2C$($F!"(B
$B%9%H%j!<%`$H$7$F$b;H$($^$9!#(B
$BJQ?t(B@code{standard-input}$B$d(B@code{standard-output}$B$NCM$K$J$j$^$9!#(B
$B$^$?!"%*%V%8%'%/%H(B@code{t}$B$b!"(B
$B%_%K%P%C%U%!!J(B@pxref{Minibuffers}$B!K$r;H$&F~NO%9%H%j!<%`$d(B
$B%(%3!<NN0h$X$N=PNO!J(B@pxref{The Echo Area}$B!K$r0UL#$7$^$9!#(B
@c   Streams have no special printed representation or read syntax, and
@c print as whatever primitive type they are.
$B%9%H%j!<%`$K$OI=<(7A<0$bF~NO9=J8$b$J$/!"$=$N4pK\7?$GI=<($7$^$9!#(B
@c   @xref{Read and Print}, for a description of functions
@c related to streams, including parsing and printing functions.
$B9=J82r@O4X?t$dI=<(4X?t$r4^$`%9%H%j!<%`$K4XO"$7$?4X?t$N@bL@$O!"(B
@xref{Read and Print}$B!#(B
@node Keymap Type
@c @subsection Keymap Type
@subsection $B%-!<%^%C%W7?(B
@c   A @dfn{keymap} maps keys typed by the user to commands.  This mapping
@c controls how the user's command input is executed.  A keymap is actually
@c a list whose @sc{car} is the symbol @code{keymap}.
@dfn{$B%-!<%^%C%W(B}$B!J(Bkeymap$B!K$O!"%f!<%6!<$,BG$C$?%-!<$r%3%^%s%I$KBP1~IU$1$^$9!#(B
$B$3$NBP1~IU$1$O!"%f!<%6!<$N%3%^%s%IF~NO$r$I$N$h$&$K<B9T$9$k$+$r@)8f$7$^$9!#(B
$B%-!<%^%C%W$O!"<B:]$K$O!"%j%9%H$G$"$j!"(B
$B$=$N(B@sc{car}$B$O%7%s%\%k(B@code{keymap}$B$G$9!#(B
@c   @xref{Keymaps}, for information about creating keymaps, handling prefix
@c keys, local as well as global keymaps, and changing key bindings.
$B%-!<%^%C%W$N:n@.!"%W%l%U%#%C%/%9%-!<$N07$$J}!"(B
$B%0%m!<%P%k$d%m!<%+%k$J%-!<%^%C%W!"%-!<%P%$%s%G%#%s%0$NJQ99$K4X$9$k>pJs$O!"(B
@xref{Keymaps}$B!#(B
@node Overlay Type
@c @subsection Overlay Type
@subsection $B%*!<%P%l%$7?(B
@c   An @dfn{overlay} specifies properties that apply to a part of a
@c buffer.  Each overlay applies to a specified range of the buffer, and
@c contains a property list (a list whose elements are alternating property
@c names and values).  Overlay properties are used to present parts of the
@c buffer temporarily in a different display style.  Overlays have no read
@c syntax, and print in hash notation, giving the buffer name and range of
@c positions.
@dfn{$B%*!<%P%l%$(B}$B!J(Boverlay$B!K$O!"%P%C%U%!$N$"$kItJ,$K:nMQ$9$kB0@-$r;XDj$7$^$9!#(B
$B3F%*!<%P%l%$$O!"%P%C%U%!$N;XDj$7$?HO0O$K:nMQ$7!"(B
$BB0@-%j%9%H!JB0@-L>$HCM$NMWAG$r8r8_$K7+$jJV$9%j%9%H!K$r4^$s$G$$$^$9!#(B
$B%*!<%P%l%$B0@-$O!"(B
$B%P%C%U%!$N0lIt$r0l;~E*$K0[$J$C$?J}<0$GI=<($9$k$?$a$K;H$o$l$^$9!#(B
$B%*!<%P%l%$B0@-$KF~NO9=J8$O$J$/!"(B
$B%P%C%U%!L>$H0LCVHO0O$r4^$s$@%O%C%7%e5-K!$GI=<($7$^$9!#(B
@c   @xref{Overlays}, for how to create and use overlays.
$B%*!<%P%l%$$N:n@.$H;HMQK!$K$D$$$F$O!"(B@xref{Overlays}$B!#(B
@node Type Predicates
@c @section Type Predicates
@section $B7?=R8l(B
@c @cindex predicates
@c @cindex type checking
@cindex $B=R8l(B
@cindex $B7?8!::(B
@kindex wrong-type-argument
@c   The Emacs Lisp interpreter itself does not perform type checking on
@c the actual arguments passed to functions when they are called.  It could
@c not do so, since function arguments in Lisp do not have declared data
@c types, as they do in other programming languages.  It is therefore up to
@c the individual function to test whether each actual argument belongs to
@c a type that the function can use.
Emacs Lisp$B%$%s%?!<%W%j%?<+?H$O!"4X?t$r8F$S=P$9$H$-$KEO$9<B0z?t$N(B
$B7?8!::$r9T$$$^$;$s!#(B
$B$=$&$G$-$J$$$N$O!"B>$N%W%m%0%i%`8@8l$,9T$&$h$&$K$O!"(B
Lisp$B$N4X?t$N0z?t$K$O%G!<%?7?$N@k8@$,$J$$$+$i$G$9!#(B
$B$7$?$,$C$F!"3F<B0z?t$,$=$N4X?t$G07$($k7?$KB0$9$k$+$I$&$+$r8!::$9$k$N$O!"(B
$B3F4X?t$N@UG$$G$9!#(B
@c   All built-in functions do check the types of their actual arguments
@c when appropriate, and signal a @code{wrong-type-argument} error if an
@c argument is of the wrong type.  For example, here is what happens if you
@c pass an argument to @code{+} that it cannot handle:
$B$9$Y$F$NAH$_9~$_4X?t$O!"I,MW$J$H$-$K$O<B0z?t$N7?8!::$r9T$$!"(B
$B0z?t$,8m$C$?7?$G$"$l$P!"%(%i!<(B@code{wrong-type-argument}$B$rDLCN$7$^$9!#(B
$B$?$H$($P!"(B@code{+}$B$K07$($J$$0z?t$rEO$9$H!"$D$.$N$h$&$K$J$j$^$9!#(B
@example
@group
(+ 2 'a)
     @error{} Wrong type argument: number-or-marker-p, a
@end group
@end example
@c @cindex type predicates
@c @cindex testing types
@cindex $B7?=R8l(B
@cindex $B7?$N8!::(B
@c   If you want your program to handle different types differently, you
@c must do explicit type checking.  The most common way to check the type
@c of an object is to call a @dfn{type predicate} function.  Emacs has a
@c type predicate for each type, as well as some predicates for
@c combinations of types.
$BFI<T$N%W%m%0%i%`$G!"0[$J$k7?$r0[$J$k$h$&$K07$$$?$$>l9g$K$O!"(B
$BL@<(E*$K7?8!::$r9T$&I,MW$,$"$j$^$9!#(B
$B%*%V%8%'%/%H$N7?$r8!::$9$k$b$C$H$b0lHLE*$JJ}K!$O!"(B
@dfn{$B7?=R8l(B}$B!J(Btype predicate$B!K4X?t$r8F$S=P$9$3$H$G$9!#(B
Emacs$B$K$O!"3F7?$4$H$K7?=R8l$,$"$j!"(B
$B7?$rAH$_9g$o$;$?$b$N$KBP$9$k=R8l$b$"$j$^$9!#(B
@c   A type predicate function takes one argument; it returns @code{t} if
@c the argument belongs to the appropriate type, and @code{nil} otherwise.
@c Following a general Lisp convention for predicate functions, most type
@c predicates' names end with @samp{p}.
$B7?=R8l4X?t$O(B1$B$D$N0z?t$r<h$j$^$9!#(B
$B0z?t$,E,@Z$J7?$KB0$7$F$$$l$P(B@code{t}$B$rJV$7!"(B
$B$5$b$J$1$l$P(B@code{nil}$B$rJV$7$^$9!#(B
$B=R8l4X?t$K4X$9$k(BLisp$B0lHL$N47=,$K=>$C$F!"(B
$B$[$H$s$I$N7?=R8l$NL>A0$O(B@samp{p}$B$G=*$j$^$9!#(B
@c   Here is an example which uses the predicates @code{listp} to check for
@c a list and @code{symbolp} to check for a symbol.
$B0J2<$O!"%j%9%H$N8!::$K=R8l(B@code{listp}$B$r;H$$!"(B
$B%7%s%\%k$N8!::$K=R8l(B@code{symbolp}$B$r;H$&Nc$G$9!#(B
@example
(defun add-on (x)
  (cond ((symbolp x)
@c          ;; If X is a symbol, put it on LIST.
         ;; X$B$,%7%s%\%k$J$i$P!"$=$l$r(BLIST$B$K2C$($k(B
         (setq list (cons x list)))
        ((listp x)
@c          ;; If X is a list, add its elements to LIST.
         ;; X$B$,%j%9%H$J$i$P!"$=$NMWAG$r(BLIST$B$KDI2C$9$k(B
         (setq list (append x list)))
        (t
@c          ;; We handle only symbols and lists.
         ;; $B%7%s%\%k$H%j%9%H$@$1$r07$&(B
         (error "Invalid argument %s in add-on" x))))
@end example
@c   Here is a table of predefined type predicates, in alphabetical order,
@c with references to further information.
$BDj5A:Q$_$N7?=R8l$r!"%"%k%U%!%Y%C%H=g$K!";2>H@h$rJ;5-$7$F$"$2$F$*$-$^$9!#(B
@table @code
@item atom
@c @xref{List-related Predicates, atom}.
@pxref{List-related Predicates, atom}$B!#(B
@item arrayp
@c @xref{Array Functions, arrayp}.
@pxref{Array Functions, arrayp}$B!#(B
@item bool-vector-p
@c @xref{Bool-Vectors, bool-vector-p}.
@pxref{Bool-Vectors, bool-vector-p}$B!#(B
@item bufferp
@c @xref{Buffer Basics, bufferp}.
@pxref{Buffer Basics, bufferp}$B!#(B
@item byte-code-function-p
@c @xref{Byte-Code Type, byte-code-function-p}.
@pxref{Byte-Code Type, byte-code-function-p}$B!#(B
@item case-table-p
@c @xref{Case Tables, case-table-p}.
@pxref{Case Tables, case-table-p}$B!#(B
@item char-or-string-p
@c @xref{Predicates for Strings, char-or-string-p}.
@pxref{Predicates for Strings, char-or-string-p}$B!#(B
@item char-table-p
@c @xref{Char-Tables, char-table-p}.
@pxref{Char-Tables, char-table-p}$B!#(B
@item commandp
@c @xref{Interactive Call, commandp}.
@pxref{Interactive Call, commandp}$B!#(B
@item consp
@c @xref{List-related Predicates, consp}.
@pxref{List-related Predicates, consp}$B!#(B
@item display-table-p
@c @xref{Display Tables, display-table-p}.
@pxref{Display Tables, display-table-p}$B!#(B
@item floatp
@c @xref{Predicates on Numbers, floatp}.
@pxref{Predicates on Numbers, floatp}$B!#(B
@item frame-configuration-p
@c @xref{Frame Configurations, frame-configuration-p}.
@pxref{Frame Configurations, frame-configuration-p}$B!#(B
@item frame-live-p
@c @xref{Deleting Frames, frame-live-p}.
@pxref{Deleting Frames, frame-live-p}$B!#(B
@item framep
@c @xref{Frames, framep}.
@pxref{Frames, framep}$B!#(B
@item functionp
@c @xref{Functions, functionp}.
@pxref{Functions, functionp}$B!#(B
@item integer-or-marker-p
@c @xref{Predicates on Markers, integer-or-marker-p}.
@pxref{Predicates on Markers, integer-or-marker-p}$B!#(B
@item integerp
@c @xref{Predicates on Numbers, integerp}.
@pxref{Predicates on Numbers, integerp}$B!#(B
@item keymapp
@c @xref{Creating Keymaps, keymapp}.
@pxref{Creating Keymaps, keymapp}$B!#(B
@item listp
@c @xref{List-related Predicates, listp}.
@pxref{List-related Predicates, listp}$B!#(B
@item markerp
@c @xref{Predicates on Markers, markerp}.
@pxref{Predicates on Markers, markerp}$B!#(B
@item wholenump
@c @xref{Predicates on Numbers, wholenump}.
@pxref{Predicates on Numbers, wholenump}$B!#(B
@item nlistp
@c @xref{List-related Predicates, nlistp}.
@pxref{List-related Predicates, nlistp}$B!#(B
@item numberp
@c @xref{Predicates on Numbers, numberp}.
@pxref{Predicates on Numbers, numberp}$B!#(B
@item number-or-marker-p
@c @xref{Predicates on Markers, number-or-marker-p}.
@pxref{Predicates on Markers, number-or-marker-p}$B!#(B
@item overlayp
@c @xref{Overlays, overlayp}.
@pxref{Overlays, overlayp}$B!#(B
@item processp
@c @xref{Processes, processp}.
@pxref{Processes, processp}$B!#(B
@item sequencep
@c @xref{Sequence Functions, sequencep}.
@pxref{Sequence Functions, sequencep}$B!#(B
@item stringp
@c @xref{Predicates for Strings, stringp}.
@pxref{Predicates for Strings, stringp}$B!#(B
@item subrp
@c @xref{Function Cells, subrp}.
@pxref{Function Cells, subrp}$B!#(B
@item symbolp
@c @xref{Symbols, symbolp}.
@pxref{Symbols, symbolp}$B!#(B
@item syntax-table-p
@c @xref{Syntax Tables, syntax-table-p}.
@pxref{Syntax Tables, syntax-table-p}$B!#(B
@item user-variable-p
@c @xref{Defining Variables, user-variable-p}.
@pxref{Defining Variables, user-variable-p}$B!#(B
@item vectorp
@c @xref{Vectors, vectorp}.
@pxref{Vectors, vectorp}$B!#(B
@item window-configuration-p
@c @xref{Window Configurations, window-configuration-p}.
@pxref{Window Configurations, window-configuration-p}$B!#(B
@item window-live-p
@c @xref{Deleting Windows, window-live-p}.
@pxref{Deleting Windows, window-live-p}$B!#(B
@item windowp
@c @xref{Basic Windows, windowp}.
@pxref{Basic Windows, windowp}$B!#(B
@end table
@c   The most general way to check the type of an object is to call the
@c function @code{type-of}.  Recall that each object belongs to one and
@c only one primitive type; @code{type-of} tells you which one (@pxref{Lisp
@c Data Types}).  But @code{type-of} knows nothing about non-primitive
@c types.  In most cases, it is more convenient to use type predicates than
@c @code{type-of}.
$B%*%V%8%'%/%H$N7?$rD4$Y$k$b$C$H$b0lHLE*$JJ}K!$O!"(B
$B4X?t(B@code{type-of}$B$r8F$S=P$9$3$H$G$9!#(B
$B3F%*%V%8%'%/%H$O$?$C$?(B1$B$D$N4pK\7?$KB0$9$k$3$H$r;W$$=P$7$F$/$@$5$$!#(B
@code{type-of}$B$O$I$N(B1$B$D$+$r65$($F$/$l$^$9!J(B@pxref{Lisp Data Types}$B!K!#(B
$B$7$+$7!"(B@code{type-of}$B$O!"4pK\7?0J30$K$D$$$F$O$J$K$bCN$j$^$;$s!#(B
$BB?$/$N>l9g!"(B@code{type-of}$B$h$j7?=R8l$r;H$&$[$&$,JXMx$G$7$g$&!#(B
@defun type-of object
@c This function returns a symbol naming the primitive type of
@c @var{object}.  The value is one of the symbols @code{symbol},
@c @code{integer}, @code{float}, @code{string}, @code{cons}, @code{vector},
@c @code{char-table}, @code{bool-vector}, @code{subr},
@c @code{compiled-function}, @code{marker}, @code{overlay}, @code{window},
@c @code{buffer}, @code{frame}, @code{process}, or
@c @code{window-configuration}.
$B$3$N4X?t$O!"(B@var{object}$B$N4pK\7?$r<($9%7%s%\%k$rJV$9!#(B
$B$=$NCM$O!"(B
@code{symbol}$B!"(B
@code{integer}$B!"(B@code{float}$B!"(B@code{string}$B!"(B@code{cons}$B!"(B@code{vector}$B!"(B
@code{char-table}$B!"(B@code{bool-vector}$B!"(B@code{subr}$B!"(B
@code{compiled-function}$B!"(B@code{marker}$B!"(B@code{overlay}$B!"(B@code{window}$B!"(B
@code{buffer}$B!"(B@code{frame}$B!"(B@code{process}$B!"(B@code{window-configuration}$B$N(B
$B%7%s%\%k$N$&$A$N(B1$B$D!#(B
@example
(type-of 1)
     @result{} integer
(type-of 'nil)
     @result{} symbol
@c (type-of '())    ; @r{@code{()} is @code{nil}.}
(type-of '())    ; @r{@code{()}$B$O(B@code{nil}}
     @result{} symbol
(type-of '(x))
     @result{} cons
@end example
@end defun
@node Equality Predicates
@c @section Equality Predicates
@section $BF1CM=R8l(B
@c @cindex equality
@cindex $BF1CM(B
@c   Here we describe two functions that test for equality between any two
@c objects.  Other functions test equality between objects of specific
@c types, e.g., strings.  For these predicates, see the appropriate chapter
@c describing the data type.
2$B$D$N%*%V%8%'%/%H$NF1CM4X78$rD4$Y$k(B2$B$D$N4X?t$r@bL@$7$^$9!#(B
$BJ8;zNs$J$I$NFCDj$N%*%V%8%'%/%H$,F1CM$G$"$k$+$rD4$Y$k4X?t72$b$"$j$^$9!#(B
$B$3$l$i$N=R8l$K$D$$$F$O!"%G!<%?7?$r=R$Y$F$$$kE,@Z$J>O$r;2>H$7$F$/$@$5$$!#(B
@defun eq object1 object2
@c This function returns @code{t} if @var{object1} and @var{object2} are
@c the same object, @code{nil} otherwise.  The ``same object'' means that a
@c change in one will be reflected by the same change in the other.
$B$3$N4X?t$O!"(B@var{object1}$B$H(B@var{object2}$B$,(B
$BF10l%*%V%8%'%/%H$G$"$l$P(B@code{t}$B$rJV$7!"$5$b$J$1$l$P(B@code{nil}$B$rJV$9!#(B
$B!XF10l%*%V%8%'%/%H!Y$H$O!"(B
$B0lJ}$rJQ99$9$k$H!"B>J}$K$bF1$8JQ99$,H?1G$5$l$k$3$H$r0UL#$9$k!#(B
@c @code{eq} returns @code{t} if @var{object1} and @var{object2} are
@c integers with the same value.  Also, since symbol names are normally
@c unique, if the arguments are symbols with the same name, they are
@c @code{eq}.  For other types (e.g., lists, vectors, strings), two
@c arguments with the same contents or elements are not necessarily
@c @code{eq} to each other: they are @code{eq} only if they are the same
@c object.
@code{eq}$B$O!"(B@var{object1}$B$H(B@var{object2}$B$,F1$8CM$N@0?t$G$"$k$H(B
@code{t}$B$rJV$9!#(B
$B$^$?!"%7%s%\%kL>$O!"IaDL!"0l0U$G$"$k$N$G!"(B
$B0z?t$,F1$8L>A0$N%7%s%\%k$G$"$l$P!"$=$l$i$O(B@code{eq}$B$G$"$k!#(B
$B!J%j%9%H!"%Y%/%H%k!"J8;zNs$J$I$N!K$=$l0J30$N7?$N>l9g!"(B
2$B$D$N0z?t$,F1$8FbMF$dMWAG$G$"$C$F$b!"(B
$B8_$$$K(B@code{eq}$B$G$"$k$H$O8B$i$J$$!#(B
$B$=$l$i$,F10l%*%V%8%'%/%H$G$"$k>l9g$K8B$j(B@code{eq}$B$G$"$k!#(B
@example
@group
(eq 'foo 'foo)
     @result{} t
@end group
@group
(eq 456 456)
     @result{} t
@end group
@group
(eq "asdf" "asdf")
     @result{} nil
@end group
@group
(eq '(1 (2 (3))) '(1 (2 (3))))
     @result{} nil
@end group
@group
(setq foo '(1 (2 (3))))
     @result{} (1 (2 (3)))
(eq foo foo)
     @result{} t
(eq foo '(1 (2 (3))))
     @result{} nil
@end group
@group
(eq [(1 2) 3] [(1 2) 3])
     @result{} nil
@end group
@group
(eq (point-marker) (point-marker))
     @result{} nil
@end group
@end example
@c The @code{make-symbol} function returns an uninterned symbol, distinct
@c from the symbol that is used if you write the name in a Lisp expression.
@c Distinct symbols with the same name are not @code{eq}.  @xref{Creating
@c Symbols}.
$B4X?t(B@code{make-symbol}$B$O!"%$%s%?!<%s$7$?%7%s%\%k$rJV$9!#(B
$B$3$N%7%s%\%k$O!"(BLisp$B<0$K=q$$$?F1$8L>A0$N%7%s%\%k$H6hJL$5$l$k!#(B
$BL>A0$,F1$8$G$b6hJL$5$l$k%7%s%\%k$O(B@code{eq}$B$G$O$J$$!#(B
@pxref{Creating Symbols}$B!#(B
@example
@group
(eq (make-symbol "foo") 'foo)
     @result{} nil
@end group
@end example
@end defun
@defun equal object1 object2
@c This function returns @code{t} if @var{object1} and @var{object2} have
@c equal components, @code{nil} otherwise.  Whereas @code{eq} tests if its
@c arguments are the same object, @code{equal} looks inside nonidentical
@c arguments to see if their elements are the same.  So, if two objects are
@c @code{eq}, they are @code{equal}, but the converse is not always true.
$B$3$N4X?t$O!"(B @var{object1}$B$H(B@var{object2}$B$,Ey$7$$MWAG$r;}$F$P(B@code{t}$B$rJV$7!"(B
$B$5$b$J$1$l$P(B@code{nil}$B$rJV$9!#(B
@code{eq}$B$O0z?t$,F10l%*%V%8%'%/%H$+$I$&$+$rD4$Y$k$,!"(B
@code{equal}$B$O!"F10l$G$O$J$$0z?t$NFbIt$rD4$Y!"(B
$B$=$l$i$NMWAG$,F1$8$+$I$&$+$rD4$Y$k!#(B
$B$7$?$,$C$F!"(B2$B$D$N%*%V%8%'%/%H$,(B@code{eq}$B$J$i$P!"(B
$B$=$l$i$O(B@code{equal}$B$G$"$k$,!"$=$N5U$O$D$M$K??$H$O8B$i$J$$!#(B
@example
@group
(equal 'foo 'foo)
     @result{} t
@end group
@group
(equal 456 456)
     @result{} t
@end group
@group
(equal "asdf" "asdf")
     @result{} t
@end group
@group
(eq "asdf" "asdf")
     @result{} nil
@end group
@group
(equal '(1 (2 (3))) '(1 (2 (3))))
     @result{} t
@end group
@group
(eq '(1 (2 (3))) '(1 (2 (3))))
     @result{} nil
@end group
@group
(equal [(1 2) 3] [(1 2) 3])
     @result{} t
@end group
@group
(eq [(1 2) 3] [(1 2) 3])
     @result{} nil
@end group
@group
(equal (point-marker) (point-marker))
     @result{} t
@end group
@group
(eq (point-marker) (point-marker))
     @result{} nil
@end group
@end example
@c Comparison of strings is case-sensitive, but does not take account of
@c text properties---it compares only the characters in the strings.
@c A unibyte string never equals a multibyte string unless the
@c contents are entirely @sc{ASCII} (@pxref{Text Representations}).
$BJ8;zNs$NHf3S$G$OBgJ8;z>.J8;z$r6hJL$9$k$,!"%F%-%9%HB0@-$O9MN8$7$J$$!#(B
$B$D$^$j!"J8;zNsFb$NJ8;z$@$1$rHf3S$9$k!#(B
$BJ8;zNs$NFbMF$,$9$Y$F(B@sc{ASCII}$B$G$J$1$l$P!"(B
$B%f%K%P%$%HJ8;zNs$H%^%k%A%P%$%HJ8;zNs$,Ey$7$$$3$H$O$J$$(B
$B!J(B@pxref{Text Representations}$B!K!#(B
@example
@group
(equal "asdf" "ASDF")
     @result{} nil
@end group
@end example
@c Two distinct buffers are never @code{equal}, even if their contents
@c are the same.
$B$?$H$(FbMF$,F1$8$G$"$C$F$b!"(B
$B0[$J$k(B2$B$D$N%P%C%U%!$,(B@code{equal}$B$G$"$k$3$H$O$J$$!#(B
@end defun
@c   The test for equality is implemented recursively, and circular lists may
@c therefore cause infinite recursion (leading to an error).
@code{equal}$B$N8!::$O:F5"$G<BAu$5$l$F$$$k$N$G!"(B
$B%j%9%H$K=[4D$,$"$k$HL58B:F5"$r0z$-5/$3$7!J%(%i!<$K$J$j!K$^$9!#(B
 |