XEmacs / man / xemacs-faq.texi

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

@titlepage
@title XEmacs FAQ
@subtitle Frequently asked questions about XEmacs
@subtitle Last Modified:  1995/08/29
@sp 1
@author Anthony Rossini <arossini@@biostats.hmc.psu.edu>
@author Ben Wing <wing@@netcom.com>
@author Chuck Thompson <cthomp@@cs.uiuc.edu>
@page
@end titlepage

@c Some of this stuff needs to go in the HTML version which means it
@c needs to be put outside of the ifinfo statement.

@ifinfo
@node top, 1. Introductory Questions, (dir), (dir)
@unnumbered XEmacs FAQ

Version:  1995/08/29

Current-Editor: Chuck Thompson <cthomp@@cs.uiuc.edu>

Copying Status: Freely Redistributable.  I take no liability for the
                correctness and safety of any procedures or advice given
                here.  This FAQ is distributed in the hope that it will
                be useful, but WITHOUT ANY WARRANTY; without even the
                implied warranty of MERCHANTABILITY or FITNESS FOR A
                PARTICULAR PURPOSE.

This is a list of frequently asked questions for XEmacs users and
maintainers. 

You can obtain the latest version of this file by anonymous FTP from
site @file{ftp.cs.uiuc.edu:/pub/xemacs/faq/xemacs-faq.FORMAT} where FORMAT
is text, texinfo (the master copy), postscript, dvi, html, info.  Note that
the html version has 2 files.

Thanks to the many who contributed, especially to JWZ <jwz@@netscape.com> for
starting this whole wonderful mess...  Special thanks to Tim Geisler
<tmgeisle@@faui80.informatik.uni-erlangen.de> for the initial texinfo
version and to Giacomo Boffi <sboff@@hp735.stru.polimi.it> for the initial
HTML version.  Other contributors (many left out, unfortunately, due to an
old mail-purge) include:
@itemize @bullet
@item
Juergen Nickelsen <nickel@@prz.tu-berlin.de>
@item
Evelyn Ginsparg <ginsparg@@adra.com>
@item
d3h554@@foghorn.pnl.gov
@item
Marty Hall <hall@@aplcenmp.apl.jhu.edu>
@item
Richard Caley <rjc@@cogsci.ed.ac.uk>
@item
fcg@@philabs.Philips.COM
@item
Stig <stig@@hackvan.com>
@item
Arup Mukherjee <arup+@@cmu.edu>
@item
Kevin R. Powell <powell@@csl.ncsa.uiuc.edu>
@item
Eric Eide <eeide@@cs.utah.edu>
@item
William G. Dubuque <wgd@@martigny.ai.mit.edu>
@item 
Chris Flatters <cflatter@@nrao.edu>
@item
John A. Turner <turner@@lanl.gov>
@end itemize

@end ifinfo

@menu
* top::                         XEmacs FAQ
* 1. Introductory Questions::.
* 2. Compiling XEmacs::.
* 3. Problems running XEmacs / weird messages::.
* 4. Customization -- Emacs Lisp and the .emacs file::.
* 5. Customization -- X resources::.
* 6. Changing textual fonts and colors::.
* 7. The modeline::.
* 8. The keyboard::.
* 9. The cursor::.
* 10. The mouse; cutting and pasting::.
* 11. Highlighting::.
* 12. The menubar and toolbar::.
* 13. Scrollbars::.
* 14. Frame Geometry::.
* 15. Window/icon title; window manager problems::.
* 16. Editing source code (C mode; Lisp mode; etc.)::.
* 17. Text mode::.
* 18. Shell mode::.
* 19. Mail; VM; GNUS; BBDB; and related::.
* 20. Printing::.
* 21. Gnuserv::.
* 22. Miscellaneous::.
@end menu



@node 1. Introductory Questions, 2. Compiling XEmacs, top, top
@chapter 1. Introductory Questions

@menu
* 1.1.::          1.1. Preface
* 1.2.::          1.2. What is XEmacs?
* 1.3.::          1.3. What is the current version of XEmacs?
* 1.4.::          1.4. Where can I find it?
* 1.5.::          1.5. Why another version of Emacs?
* 1.6.::          1.6. What do @kbd{M-x}, GNU, etc. mean?
* 1.7.::          1.7. Where can I get help for using XEmacs?
* 1.8.::          1.8. Where is the mailing list archived?
* 1.9.::          1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?
@end menu


@node 1.1.
@section 1.1. Preface

This is the introduction to a list of frequently asked questions (FAQ's)
about XEmacs with answers.  This article contains a listing of the
questions; subsequent articles contain the questions and answers.

This is not a substitute for general Emacs questions, and actually
includes nothing that might help a novice learn to use Emacs or XEmacs.
For that, check out the regular Emacs lists, the tutorial inside of
XEmacs (look on the Help menu), or the O'Reilly book @cite{Learning GNU
Emacs}.  This FAQ focuses on specific issues regarding XEmacs.  If you
don't find the answer here, perhaps it really is a more general
question, and check the GNU Emacs FAQ for more information, as well.

The FAQ list is posted to reduce the noise level in the
@samp{comp.emacs.xemacs} newsgroup which results from the repetition of
frequently asked questions, wrong answers to these questions,
corrections to the wrong answers, corrections to the corrections,
debate, name calling, etc.  Also, it serves as a repository of the
canonical ``best'' answers to these questions.  However, if you know a
better answer or even a slight change that improves an answer, please
tell me!

If you know the answer of a question is in the FAQ list, please reply to
the question by e-mail instead of posting.  Help reduce noise!

Please suggest new questions, answers, wording changes, deletions, etc.
The most helpful form for suggestions is a context diff (i.e. the output
of @samp{diff -c}).  Include @samp{FAQ} in the subject of messages sent
to us about the FAQ list.

Please do not send questions to us just because you do not want to
disturb a lot of people and you think we would know the answer.  We do
not have time to answer questions individually and keep up with
everything else we have to get done.

Many thanks need to go to all contributors on the old alt.lucid-emacs.*
and current comp.emacs.xemacs groups.  This would never have been
collected without you.

Any directories given are usually in reference to the base directory
formed by unpacking XEmacs.


@node 1.2.
@section 1.2. What is XEmacs?

An alternative to GNU Emacs, originally based on an early alpha version
of FSF's version 19.  XEmacs was known as Lucid Emacs through version
19.10.  Almost all features of GNU Emacs are supported in XEmacs (the
ones that aren't supported are generally implemented in a better way in
XEmacs).  The maintainers of XEmacs actively track changes to GNU Emacs
while also working to add new features never before seen in Emacs.


@node 1.3.
@section 1.3. What is the current version of XEmacs?

The current version is 19.13, released on September 1, 1995.


@node 1.4.
@section 1.4. Where can I find it?

The canonical source and binaries is found via anonymous FTP at
@ifinfo
@file{ftp.cs.uiuc.edu:/pub/xemacs}.
@end ifinfo
@ifhtml
<A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/">ftp.cs.uiuc.edu:/pub/xemacs/</A>
@end ifhtml

@node 1.5.
@section 1.5. Why Another Version of Emacs?

@ifinfo
For a detailed description of the differences between GNU Emacs and
XEmacs, and a detailed history of XEmacs, see the file @file{etc/NEWS}
in the source distribution.  However, here is a list of some of the
reasons why we think you might consider using it:
@end ifinfo
@ifhtml
For a detailed description of the differences between GNU Emacs and
XEmacs and a detailed history of XEmacs, check out the
<A HREF="http://xemacs.cs.uiuc.edu/NEWS.html/">NEWS</A> file.  However,
here is a list of some of the reasons why we think you might consider
using it:
@end ifhtml

@itemize @bullet
@item
It looks nicer
@item
The XEmacs maintainers are generally more receptive to suggestions than
the GNU Emacs maintainers
@item
Many more bundled packages than GNU Emacs, all properly integrated with
XEmacs
@item
Binaries are available for many common operating systems
@item
Face support on TTY's
@item
A built-in toolbar
@item
Better Motif compliance
@item
Some internationalization support for European languages.  Full MULE
(Multi-Lingual EMacs) support is being actively worked on.
@item
Variable-width fonts
@item
Variable-height lines
@item
Marginal annotations
@item
ToolTalk support
@item
XEmacs can be used as an Xt widget, and can be embedded within another
application
@item
Horizontal and vertical scrollbars (using real toolkit scrollbars)
@item
Better APIs (and performance) for attaching fonts, colors, and other
properties to text
@item
The ability to embed arbitrary graphics in a buffer
@item
Completely compatible (at the C level) with the Xt-based toolkits
@end itemize


@node 1.6.
@section 1.6. What do @kbd{M-x}, GNU, etc. mean?

This is really a general Emacs question, but a table of some common
terms/acronyms is provided here for your convenience.
@ifinfo
See the @cite{GNU Emacs FAQ} for a more complete list.
@end ifinfo
@ifhtml
See the <A HREF="http://www.eecs.nwu.edu/emacs/faq">GNU Emacs FAQ</A>
for a more complete list.
@end ifhtml

@table @samp
@item BLAT FOOP
Historical XEmacs error message
@item C-x
@dfn{C-x} means that the @key{Control} key and the @key{X} key should be
pressed together, like when you use the @key{Shift} key.
@item E-Lisp
Same as @dfn{Emacs-Lisp}.
@item Emacs-Lisp
The dialect of Lisp supported by Emacs and XEmacs.  You use this to
customize XEmacs.
@item FAQ
Frequently asked question(s).
@item FSF
The Free Software Foundation.
@item GNU
@dfn{GNU} refers to products written by the Free Software Foundation.
@item JWZ
Jamie Zawinski <jwz@@netscape.com>, the former maintainer of Lucid Emacs
(which XEmacs evolved from).
@item M-x
@dfn{M-x} means that the @key{Meta} key and the @key{X} key should be
pressed together, like when you use the @key{Shift} key.  Sometimes
the @key{Meta} key is labelled @samp{Alt} or with a diamond.  Some
keyboards don't have a @key{Meta} key at all; then you can get the
equivalent by typing the @key{Esc} key followed by the @key{X} key.
@item RMS
Richard Stallman <rms@@gnu.ai.mit.edu>, the author of GNU Emacs.
@item VI
An editor used by those heretics that don't subscribe to the Emacs religion.
@end table


@node 1.7.
@section 1.7. Where can I get help for using XEmacs?

Probably the easiest way, if everything is installed, is to use info, by
pressing @kbd{C-h i}, or selecting @samp{Emacs Info} from the Help Menu.
Also, @kbd{M-x apropos} will look for commands for you.

Try reading this FAQ, examining the regular GNU Emacs FAQ (which can be
found with the Emacs 19 distribution) as well as at
@ifinfo
@file{http://www.eecs.nwu.edu/emacs/faq/} and reading the Usenet group
@end ifinfo
@ifhtml
<A HREF="http://www.eecs.nwu.edu/emacs/faq/">http://www.eecs.nwu.edu/emacs/faq/</A>
and reading the Usenet group
@end ifhtml
@samp{comp.emacs.xemacs}.  If that does not help, try posting your
question to @samp{comp.emacs.xemacs}.  If you cannot post or read
Usenet news, there is a corresponding mailing list which is available.
It can be subscribed to by sending mail to

@example
xemacs-request@@cs.uiuc.edu
@end example

for subscription information and 

@example
xemacs@@cs.uiuc.edu
@end example

to send messages to the list.

To cancel a subscription, YOU MUST use the xemacs-request address. 

Bug reports should be sent to the same locations.


@node 1.8.
@section 1.8. Where is the mailing list archived?

The mailing list is archived in the directory
@ifinfo
@file{ftp.cs.uiuc.edu:/pub/xemacs/mlists/}.
@end ifinfo
@ifhtml
<A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/mlists/">ftp.cs.uiuc.edu:/pub/xemacs/mlists/</A>
@end ifhtml


@node 1.9.
@section 1.9. What is InfoDock, how does it relate to XEmacs, and how can I obtain it?

InfoDock is an integrated productivity toolset, mainly aimed at
technical people.  It is built atop the XEmacs variant of GNU Emacs and
so has all of the power of Emacs, but with an easier to use and more
comprehensive menu-based user interface.  The next section describes how
it differs from XEmacs and GNU Emacs from the Free Software Foundation.

The quickest way to get a feel for InfoDock is to browse the InfoDock
Manual, especially the section on tools.  This will help you decide
whether or not to download InfoDock for local use.  This manual is
available in gzipped Postscript form, alongside the InfoDock
distribution.  (See below for FTP retrieval instructions.)

InfoDock is aimed at people who want a free, turn-key productivity
environment.  Although InfoDock is customizable, it is not intended for
people who like basic versions of Emacs which need to be customized
extensively for local use; standard Emacs distributions are better for
such uses.  InfoDock is for those people who want a complete,
pre-customized environment in one package, which they need not touch
more than once or twice a year to update to new revisions.

InfoDock is pre-built for SPARCstations running SunOS V4 or V5
(Solaris).  It is intended for use on a color display, although most
features will work on monochrome monitors.  Simply unpack InfoDock
according to the instructions in the ID-INSTALL file and you are ready
to run.

The InfoDock Manual is concise, yet sufficient as a user guide for users
who have never used an Emacs-type editor before.  For users who are
already familiar with Emacs, it supplements the information in the GNU
Emacs Manual.

InfoDock menus are much more extensive and more mature than standard
Emacs menus.  Each menu offers a @samp{Manual} item which displays
documentation associated with the menu's functions.
    
Three types of menubars are provided:
@enumerate
@item
An extensive menubar providing access to global InfoDock commands.
@item
Mode-specific menubars tailored to the current major mode.
@item
A simple menubar for basic editing to help novices get started with InfoDock.
@end enumerate

Most modes also include mode-specific popup menus.  Additionally, region and
rectangle popup menus are included.
@itemize @bullet
@item
@samp{Hyperbole}, the everyday information manager, is a core part of
InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
contact manager, programmable hypertext buttons, and an autonumbered
outliner with embedded hyperlink anchors.
@item
@samp{PIEmail}, the prototype Personalized Information Environment Mail
Tool, is included.
@item
The @samp{OO-Browser}, a multi-language object-oriented code browser, is a
standard part of InfoDock.
@end itemize

InfoDock saves a more extensive set of user options than other Emacs
versions.

InfoDock inserts a useful file header in many file types, showing the
author, summary, and last modification time of each file.  A summary
program can then be used to summarize all of the files in a directory,
for easy MANIFEST file creation.

Your working set of buffers is automatically saved and restored (if you
answer yes to a prompt) between InfoDock sessions.

Refined color choices for code highlighting are provided for both dark and
light background display frames.

The @kbd{C-z} key prefix performs frame-based commands which parallel the
@kbd{C-x} key prefix for window-based commands.

The Smart Menu system is included for producing command menus on dumb
terminals. (InfoDock does not yet run on dumb terminals but will in 1995.)

Lisp libraries are better categorized according to function.

Extensions and improvements to many areas of Emacs are included, such as:
paragraph filling, mail reading with Rmail, shell handling, outlining, code
highlighting and browsing, and man page browsing.

InfoDock questions, answers and discussion should go to the mail list
@samp{infodock@@hub.ucsb.edu}.  Use
@samp{infodock-request@@hub.ucsb.edu} to be added or removed from the
list.  Always include your InfoDock version number when sending help
requests.

InfoDock is available across the Internet via anonymous FTP.  To get
it, first move to a directory into which you want the InfoDock archive
files placed.  We will call this <DIST-DIR>.
 
@example
   cd <DIST-DIR>
@end example

FTP to ftp.cs.uiuc.edu  (Internet Host ID = 128.174.252.1):

@example
   prompt> ftp ftp.cs.uiuc.edu
@end example

Login as @samp{anonymous} with your own <user-id>@@<site-name> as a password.

@example   
   Name (ftp.cs.uiuc.edu): anonymous
   331 Guest login ok, send your complete e-mail address as password.
   Password: -<your-user-id@@your-domain>
   230 Guest login ok, access restrictions apply.
@end example

Move to the location of the InfoDock archives:

@example
   ftp> cd pub/xemacs/infodock
@end example

Set your transfer mode to binary:

@example
   ftp> bin
   200 Type set to I.
@end example

Turn off prompting:

@example
   ftp> prompt
   Interactive mode off.
@end example

Retrieve the InfoDock archives that you want, either by using a
@samp{get <file>} for each file you want or by using the following to
get a complete distribution, including all binaries:

@example
   ftp> mget ID-INSTALL
   ftp> mget id-*
@end example

Close the FTP connection:

@example
   ftp> quit
   221 Goodbye.
@end example

Read the @file{ID-INSTALL} file which you just retrieved for
step-by-step installation instructions.



@node 2. Compiling XEmacs, 3. Problems running XEmacs / weird messages, 1. Introductory Questions, top
@chapter 2. Compiling XEmacs

@menu
* 2.1.::          2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root.  Also in the READMEs it does not say anything about compiling with the audioserver?
@end menu


@node 2.1.
@section 2.1. What is the best way to compile XEmacs with the netaudio system, since I have got the netaudio system compiled but installed at a weird place, I am not root.  Also in the READMEs it does not say anything about compiling with the audioserver?

You should only need to add some stuff to the configure command line.  To tell
it to compile in netaudio support:

@example
--with-sound=both
@end example

(Or @samp{--with-sound=nas} if you don't want native sound support for
some reason.) To tell it where to find the netaudio includes and
libraries:

@example
--site-libraries=WHATEVER
--site-includes=WHATEVER
@end example

Then (fingers crossed) it should compile and it will use netaudio if you
have a server running corresponding to the X server. The netaudio server
has to be there when XEmacs starts. If the netaudio server goes away and
another is run, XEmacs should cope (fingers crossed, error handling in
netaudio isn't perfect).

BTW, netaudio has been renamed as it has a name clash with something
else, so if you see references to NAS or Network Audio System, it's the
@ifinfo
same thing.  It also might be found at

@example
ftp.x.org:/contrib/audio/nas/
ftp.ncd.com:/pub/ncd/technology/src/nas/
@end example
@end ifinfo
@ifhtml
same thing.  It also might be found at
<A HREF="ftp://ftp.x.org/contrib/audio/nas/">ftp.x.org:/contrib/audio/nas/</A>
<A HREF="ftp://ftp.ncd.com:/pub/ncd/technology/src/nas/">ftp.ncd.com:/pub/ncd/technology/src/nas/</A>
@end ifhtml

@node 3. Problems running XEmacs / weird messages, 4. Customization -- Emacs Lisp and the .emacs file, 2. Compiling XEmacs, top
@chapter 3. Problems running XEmacs / weird messages

@menu
* 3.1.::          3.1. Help! XEmacs just crashed on me!
* 3.2.::          3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.
* 3.3.::          3.3. I get tons of translation table syntax error messages during startup.  How do I get rid of them?
* 3.4.::          3.4. How can I avoid the startup warnings about deducing proper fonts?
* 3.5.::          3.5. Help! I can not get XEmacs to display on my Envizex X-terminal!
* 3.6.::          3.6. Why do I get weird messages about giftoppm and ppmdither not being found?
* 3.7.::          3.7. How can I avoid those messages about deleting excess backup files?
* 3.8.::          3.8. Help! XEmacs just locked up my X server on my Linux box!
@end menu


@node 3.1.
@section 3.1. Help! XEmacs just crashed on me!

First of all, don't panic.  Whenever XEmacs crashes, it tries extremely
hard to auto-save all of your files before dying. (The main time that
this will not happen is if the machine physically lost power or if you
killed the XEmacs process using @samp{kill -9}.) The next time you
try to edit those files, you will be informed that a more recent
auto-save file exists.  You can use @kbd{M-x recover-file} to retrieve
the auto-saved version of the file.

Now, XEmacs is not perfect, and there may occasionally be times, or
particular sequences of actions, that cause it to crash.  If you can
come up with a reproducible way of doing this (or even if you have a
pretty good memory of exactly what you were doing at the time), the
maintainers would be very interested in knowing about it.  Post a
message to @samp{comp.emacs.xemacs} or send mail to
@samp{xemacs@@cs.uiuc.edu}.

If at all possible, include a stack backtrace of the core dump that was
produced.  This shows where exactly things went wrong, and makes it much
easier to diagnose problems.  To do this, you need to locate the core
file (it's called @samp{core}, and is usually sitting in the directory
that you started XEmacs from, or your home directory if that other
directory was not writable).  Then, go to that directory and execute a
command like

@example
gdb `which xemacs` core
@end example

and then issue the command @samp{where} to get the stack backtrace.
(You might have to use @samp{dbx} or some similar debugger in place
of @samp{gdb}.  If you don't have any such debugger available,
complain to your system administrator.)

It's possible that a core file didn't get produced, in which case
you're out of luck.  Go complain to your system administrator and
tell him not to disable core files by default. (If you explicitly
disabled core files, then double shame on you!)


@node 3.2.
@section 3.2. When I try to use some particular option of some particular package, I get a cryptic error in the minibuffer.

If you can't figure out what's going on, try typing @kbd{ESC ESC} and
issuing the command

@example
(setq debug-on-error t)
@end example

and then try and make the error happen again.  This will give you a
backtrace that may be enlightening.  If not, try reading farther down in
this FAQ; if that fails, you could try posting to
@samp{comp.emacs.xemacs} (making sure to include the backtrace) and
someone may be able to help.


@node 3.3.
@section 3.3. I get tons of translation table syntax error messages during startup.  How do I get rid of them?

There are two causes of this problem.  The first usually only strikes
people using the prebuilt binaries.  The culprit in both cases is the
file @file{XKeysymDB}.
@itemize @bullet
@item
The binary cannot find the XKeysymDB file.  The location is hardcoded at
compile time so if the system the binary was built on puts it a
different place than your system does, you have problems.  To fix, set
the environment variable @samp{XKEYSYMDB} to the location of the
XKeysymDB file on your system or to the location of the one included
with XEmacs which should be at:

@example
<xemacs_root_directory>/lib/xemacs-19.13/etc/XKeysymDB
@end example

@item
The binary is finding the XKeysymDB but it is out-of-date on your system
and does not contain the necessary lines.  Either ask your system
administrator to replace it with the one which comes with XEmacs (which
is the stock R6 version and is backwards compatible) or set your
@samp{XKEYSYMDB} variable to the location of XEmacs's described above.
@end itemize


@node 3.4.
@section 3.4. How can I avoid the startup warnings about deducing proper fonts?

This is highly dependent on your installation, but try with the
following font as your base font for XEmacs and see what it does: 

@example
-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
@end example

More precisely, do the following in your resource file:

@example
Emacs.default.attributeFont: -adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
@end example


@node 3.5.
@section 3.5. Help!  I can not get XEmacs to display on my Envizex X-terminal!

Try setting the DISPLAY variable using the numeric IP address of the
host you are running XEmacs from.


@node 3.6.
@section 3.6.  Why do I get weird messages about giftoppm and ppmdither not being found?

Because they are not.  You are probably trying to read some HTML files,
or using W3-mode as your Web client.  To display inline pictures, this
requires the above programs (which can be found in the netpbm package or
its older version, pbmplus).  The netpbm package can be found at
@ifinfo
@samp{ftp.x.org}, or any of its mirror sites.  It can also be found at
@samp{ftp.cs.uiuc.edu:/pub/xemacs/aux}.
@end ifinfo
@ifhtml
<A HREF="ftp://ftp.x.org/contrib/utilities/">ftp.x.org:/contrib/utilities/</A>
.  It can also be found at
<A HREF="ftp://ftp.cs.uiuc.edu/pub/xemacs/aux/">ftp.cs.uiuc.edu:/pub/xemacs/aux/</A>
@end ifhtml


@node 3.7.
@section 3.7.  How can I avoid those messages about deleting excess backup files?


Try the following Emacs-Lisp:

@example
(setq version-control t)
(setq kept-old-versions 0)
(setq kept-new-versions 8)
(if (string-match "XEmacs\\|Lucid" emacs-version)
   (setq trim-versions-without-asking t)
   (setq delete-old-versions t))
@end example

@node 3.8.
@section 3.8.  Help! XEmacs just locked up my X server on my Linux box!

There have been several reports of the X server locking up under Linux.
In all reported cases removing speedo and scaled fonts from the font
path corrected the problem.  This can be done with the command 'xset'.

It is possible that using a font server may also solve the problem.



@node 4. Customization -- Emacs Lisp and the .emacs file, 5. Customization -- X resources, 3. Problems running XEmacs / weird messages, top
@chapter 4. Customization -- Emacs Lisp and the .emacs file

@menu
* 4.1.::          4.1. How can @file{.emacs} determine which of the family of emacsen I am using?
* 4.2.::          4.2. How can I detect a color display?
* 4.3.::          4.3. How can I evaluate emacs-lisp expressions without switching to the *scratch* buffer?
* 4.4.::          4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work!  Is there a reason for this.  If you do it at the EVAL prompt it works fine!! How strange.
* 4.5.::          4.5. How can I add directories to the load-path?
* 4.6.::          4.6. How to check if a lisp function is defined or not?
* 4.7.::          4.7.  Can I force the output of (list-faces) to a buffer other than the minibuffer since it is too wide to fit?
@end menu


@node 4.1.
@section 4.1. How can @file{.emacs} determine which of the family of Emacsen I am using?

To determine if you are currently running GNU Emacs 18, GNU Emacs 19,
XEmacs 19, or Epoch, and use appropriate code, check out the example
given in @file{etc/sample.emacs}.  There are other nifty things in there
as well!  Alternatively, there is a package, @file{emacs-vers.el},
available at an Emacs-Lisp archive near you; try searching

@example
archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive/misc/
@end example


@node 4.2.
@section 4.2. How can I detect a color display?

You can test the return value of the function
@code{(device-class)}, as in:

@example
(if (eq (device-class) 'color)
    (progn 
      (set-face-foreground  'font-lock-comment-face "Grey")
      (set-face-foreground  'font-lock-string-face "Red")
      ....
      ))
@end example


@node 4.3.
@section 4.3. How can I evaluate Emacs-Lisp expressions without switching to the *scratch* buffer?

@example
(put 'eval-expression 'disabled nil)
@end example

This sets it so that hitting @kbd{ESC ESC} lets you type a single
expression to be evaluated.  This line can also be put into your
@file{.emacs}.


@node 4.4.
@section 4.4. If you put (setq tab-width 6) in your @file{.emacs} file it does not work!  Is there a reason for this.  If you do it at the EVAL prompt it works fine!! How strange.

Use setq-default, since tab-width is all-buffer-local.


@node 4.5.
@section 4.5. How can I add directories to the load-path?

Here are two ways to do that, one that puts your directories at the front of
the load-path, the other at the end:

@example
;;; Add things at the beginning of the load-path
(setq load-path (cons "bar" load-path))
(setq load-path (cons "foo" load-path))

;;; Add things at the end
(setq load-path (append load-path '("foo" "bar")))
@end example


@node 4.6.
@section 4.6. How to check if a lisp function is defined or not?

Use the following elisp:

@example
(fboundp 'foo)
@end example

It's always a mistake, under all circumstances, to test `emacs-version' or
any similar variables, in case they are not bound, unless you do the above.

Instead, use feature-tests, such as featurep or boundp or fboundp, or
even simple behavioural tests, eg
 (defvar foo-old-losing-code? (condition-case nil (progn (losing-code t) nil)
                                 (wrong-number-of-arguments t)))

There is an incredible amount of broken code out there which could
work much better more often in more places if it did the above instead
of trying to divine its environment from the value of one variable.


@node 4.7.
@section 4.7.  Can I force the output of (face-list) to a buffer other than the minibuffer since it is too wide to fit?

Evaluate the expression in the "*scratch*" buffer with point on the rightmost
paren and typing @kbd{C-j}.



@node 5. Customization -- X resources, 6. Changing textual fonts and colors, 4. Customization -- Emacs Lisp and the .emacs file, top
@chapter 5. Customization -- X resources

@menu
* 5.1.::          5.1. Where is a list of X resources?
@end menu


@node 5.1.
@section 5.1. Where is a list of X resources?

Search through the NEWS file for ``X Resources''.  A fairly comprehensive list
is given after it.

In addition, an app-defaults file is supplied, @file{etc/Emacs.ad},
listing the defaults.  The file @file{etc/sample.Xdefaults} gives a set
of defaults that you might consider.  It is essentially the same as
@file{etc/Emacs.ad} but some entries are slightly altered.  Be careful
about installing the contents of this file into your @file{.Xdefaults}
(.Xresources) file if you use FSF GNU Emacs under X11 as well.



@node 6. Changing textual fonts and colors, 7. The modeline, 5. Customization -- X resources, top
@chapter 6. Changing textual fonts and colors

@menu
* 6.1.::          6.1. How do I set the text, menu and modeline fonts?
* 6.2.::          6.2. How can I set the background/foreground colors when highlighting a region? 
* 6.3.::          6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}? 
@end menu


@node 6.1.
@section 6.1. How do I set the text, menu and modeline fonts?

Note that you should use @samp{Emacs.} and not @samp{Emacs*} when
setting face values.

In @file{.Xdefaults}:

@example
Emacs.default.attributeFont:  -*-*-medium-r-*-*-*-120-*-*-m-*-*-* 
Emacs*menubar*font:           fixed
Emacs.modeline.attributeFont: fixed
@end example

This is confusing because modeline is a face, and can be found listed
with all faces in the current mode by using M-x set-face-font (enter) ?.
It uses the face specification of "attributeFont", while menubar is a
normal X thing that uses the specification "font".  With Motif it may be
necessary to use "fontList" instead of "font".  (Please rewrite this if
you understand this better than me ...  A general description of faces
would be very useful.  I am just saying that menubar is a FAQ because
it's not a face and not listed.)


@node 6.2.
@section 6.2. How can I set the background/foreground colors when highlighting a region? 

You can change the face `zmacs-region' either in your @file{.Xdefaults}:

@example
Emacs.zmacs-region.attributeForeground: firebrick
Emacs.zmacs-region.attributeBackground: lightseagreen
@end example

or in your @file{.emacs}:

@example
(set-face-background 'zmacs-region "red")   
(set-face-foreground 'zmacs-region "yellow")
@end example


@node 6.3.
@section 6.3. How can I set the most commonly used color options from my @file{.emacs} instead of from my @file{.Xdefaults}? 

@example
(set-face-background 'default "bisque")          ; frame background
(set-face-foreground 'default "black")           ; normal text
(set-face-background 'zmacs-region "red")   ; When selecting w/
                                                 ; mouse 
(set-face-foreground 'zmacs-region "yellow")
(set-face-font  'default "*courier-bold-r*120-100-100*")
(set-face-background 'highlight "blue")          ; Ie when selecting buffers 
(set-face-foreground 'highlight "yellow")
(set-face-background 'modeline "blue")           ; Line at bottom of buffer
(set-face-foreground 'modeline "white")
(set-face-font  'modeline "*bold-r-normal*140-100-100*")
(set-face-background 'isearch "yellow")          ; When highlighting while
                                                 ; searching		 
(set-face-foreground 'isearch "red")
(setq x-pointer-foreground-color "black")        ; Adds to bg color,
                                                 ; so keep black
(setq x-pointer-background-color "blue")         ; This is color you really
@end example
                                                 ; want ptr/crsr


@node 7. The modeline, 8. The keyboard, 6. Changing textual fonts and colors, top
@chapter 7. The modeline

@menu
* 7.1.::          7.1. How can I make the modeline go away?
* 7.2.::          7.2. How do you have XEmacs display the line number in the modeline?
* 7.3.::          7.3. How do I get XEmacs to put the time of day on the modeline?
* 7.4.::          7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?
@end menu


@node 7.1.
@section 7.1. How can I make the modeline go away?

(set-specifier has-modeline-p nil)


@node 7.2.
@section 7.2. How do you have XEmacs display the line number in the modeline?

Add the following line to your @file{.emacs} file:

@example
(setq line-number-mode t)
@end example


@node 7.3.
@section 7.3. How do I get XEmacs to put the time of day on the modeline?

@example
(display-time)
@end example


@node 7.4.
@section 7.4. How can one change the color of the modeline based on the mode used? i.e. red for C mode, green for TeX mode etc.?

You can use something like the following:

@example
(add-hook 'lisp-mode-hook 
        '(lambda () (set-face-background 'modeline "red" (current-buffer))
                    (set-face-foreground 'modeline "yellow" (current-buffer))))
@end example

Then, when editing a Lisp file (ie went into Lisp mode), the modeline
colors change from the default set in your @file{.emacs}.  The change
will only be made in the buffer you just entered (which contains the
Lisp file you are editing) and will not affect the modeline colors
anywhere else.

Notes:

@itemize @bullet
@item
The hook is the mode name plus "-hook". Ie c-mode-hook, c++-mode-hook,
emacs-lisp-mode-hook (ie your @file{.emacs} or a xx.el file),
lisp-interaction-mode-hook (the *scratch* buffer), text-mode-hook, etc.
@item
Be sure to use add-hook, not (setq c-mode-hook xxxx), otherwise you will
erase anything that anybody has already put on the hook.
@item
You can also do (set-face-font 'modeline @code{font}), eg (set-face-font
'modeline "*bold-r-normal*140-100-100*" (current-buffer)) if you wish
the modeline font to vary based on the current mode.
@end itemize


@node 8. The keyboard, 9. The cursor, 7. The modeline, top
@chapter 8. The keyboard

@menu
* 8.1.::          8.1. What is the difference in key sequences between XEmacs and GNU Emacs? 
* 8.2.::          8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?
* 8.3.::          8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?
* 8.4.::          8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.
* 8.5.::          8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...
* 8.6.::          8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default.  How does one do this?
* 8.7.::          8.7. How can I bind complex functions (or macros) to keys?
* 8.8.::          8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump?  I tend it to find it disorienting.
* 8.9.::          8.9. How to map "Help" key alone on Sun type4 keyboard?
* 8.10.::          8.10. How can you type in special characters in XEmacs?
@end menu


@node 8.1.
@section 8.1. What is the difference in in key sequences between XEmacs and GNU Emacs? 

The real question might be rephrased as "When should one use the quoted list,
vector, or escaped string representations of key sequences?"  Is there any
particular advantage to one representation over another?

From Richard Mlynarik <mly@@adoc.xerox.com>:

@table @asis
@item (meta a)
is a convenience shorthand for the sequence @code{[(meta a)]}.
@code{(global-set-key 'a 'foo)} means the same thing as
@code{(global-set-key '[a] 'foo)}.  It could be argued that allowing
such a shorthand just leads to sloppiness and bugs, but it's there, and
it isn't likely to go away.

@item [(meta a)]
is The Right Thing.  It corresponds in a one-to-one way with the
internal representation of key-sequences in keymaps.

@item [Meta-a]
is typical FSF Emacs 19 brain damage.  As is usual, an existing,
functional design is ignored (XEmacs) and an incompatible and
technically worse kludge is used.

@item "\ea"
is compatible with Emacs 18, but suffers from ASCII Seven-Bit Brain
Damage.  I also find it harder to read.  Use this if you're trying to
write code which works in every Emacs, but be aware that you can not
express all Possible key-sequences (@kbd{control-9}, @kbd{f1}, etc.)
using this.

@end table


@node 8.2.
@section 8.2. How can I make XEmacs recognize the Alt key of my HP workstation as a Meta key?

Put the following line into a file and load it with xmodmap(1) before
starting XEmacs:

@example
remove Mod1 = Mode_switch
@end example


@node 8.3.
@section 8.3. How can I stop the down-arrow-key from adding empty lines at the bottom of my buffers?

Add the following line to your @file{.emacs} file:

@example
(setq next-line-add-newlines nil)
@end example


@node 8.4.
@section 8.4. I wonder if there is an interactive function that can generate "fake" keyboard events. This way, I could simply map them inside XEmacs.

This seems to work:
@example
(defun cg--generate-char-event (ch)
  "Generate an event, as if ch has been typed"
  (dispatch-event (character-to-event ch)))

;;  Backspace and Delete stuff
(global-set-key '(backspace)
                '(lambda () (interactive) (cg--generate-char-event 127)))
(global-set-key '(unknown_keysym_0x4)
                '(lambda () (interactive) (cg--generate-char-event 4)))
@end example


@node 8.5.
@section 8.5. I am trying to bind C-. to scroll up by one line and C-; to scroll down by one line...

Add the following (Thanks to Richard Mlynarik <mly@@adoc.xerox.com> and
Wayne Newberry <wayne@@zen.cac.stratus.com>) to @file{.emacs}:

@example
(defun scroll-up-one-line ()
  (interactive)
  (scroll-up 1))

(defun scroll-down-one-line ()
  (interactive)
  (scroll-down 1))

(global-set-key [(control ?.)]   'scroll-up-one-line)        ; C-.
(global-set-key [(control ?;)]   'scroll-down-one-line)      ; C-;
@end example

The key point is that you can only bind simple functions to keys; you can not
bind a key to a function that you're also passing arguments to.  (See <A
HREF="#ss8.7">8.7 How can I bind complex functions</A> for a better answer.)

@c Fix the above HTML specifier reference

@node 8.6.
@section 8.6. I cannot manage to globally bind my @key{Delete} key to something other than the default.  How does one do this?

@example
(defun Foo ()
  (interactive)
    (message "You hit DELETE"))

(global-set-key "\C-?" 'Foo)
@end example

However, some modes explicitly bind @key{Delete}, so you would need to
add a hook that does @code{local-set-key} for them.


@node 8.7.
@section 8.7. How can I bind complex functions (or macros) to keys?

As an example, say you want the PASTE key on a Sun keyboard to insert the
current Primary X selection at point. You can accomplish this with:

@example
(define-key global-map 'f18 'x-insert-selection)
@end example

However, this only works if there is a current X selection (the
selection will be highlighted).  The functionality I like is for the
PASTE key to insert the current X selection if there is one, otherwise
insert the contents of the clipboard.  To do this you need to pass
arguments to x-insert-selection.  This is done by wrapping the call in a
'lambda form:

@example
(define-key global-map 'f18
  (function (lambda () (interactive) (x-insert-selection t nil))))
@end example

This binds the 'f18 key to a "generic" functional object.  The interactive
spec is required because only interactive functions can be bound to keys.
Also take a look at the doc for "function".

For the FAQ example you could use:

@example
(global-set-key [(control ?.)]
		(function (lambda () (interactive) (scroll-up 1))))
(global-set-key [(control ?;)]
	        (function (lambda () (interactive) (scroll-up -1))))
@end example

This is fine if you only need a few functions within the lambda body.  If
you're doing more it's cleaner to define a separate function as in the
original FAQ example (<A HREF="#ss11.3">question 11.3</A>).

@c Fix the above HTML specifier reference

@node 8.8.
@section 8.8. Can the cursor keys scroll the screen a line at a time, rather than the default half page jump?  I tend it to find it disorienting.

Try this:

@example
(defun scroll-one-line-up (&optional arg)
  "Scroll the selected window up (forward in the text) one line (or N lines)."
  (interactive "p")
  (scroll-up (or arg 1)))

(defun scroll-one-line-down (&optional arg)
  "Scroll the selected window down (backward in the text) one line (or N)."
  (interactive "p")
  (scroll-down (or arg 1)))

(global-set-key 'up 'scroll-one-line-up)
(global-set-key 'down  'scroll-one-line-down)
@end example

The following will also work but will affect more than just the cursor
keys (i.e. C-n and C-p):

@example
(setq scroll-step 1)
@end example

@node 8.9.
@section 8.9. How to map "Help" key alone on Sun type4 keyboard?

The following works in GNU Emacs 19:

@example
(global-set-key [help] 'help-command)  		;; Help
@end example

The following works in XEmacs 19.13 with the addition of shift:

@example 
(global-set-key [(shift help)] 'help-command)  		;; Help
@end example

But it doesn't work alone.  This is in the file @file{PROBLEMS} which
should have come with your XEmacs installation:

@emph{Emacs ignores the @key{help} key when running OLWM}.

OLWM grabs the @key{help} key, and retransmits it to the appropriate
client using XSendEvent.  Allowing Emacs to react to synthetic events is
a security hole, so this is turned off by default.  You can enable it by
setting the variable x-allow-sendevents to t.  You can also cause fix
this by telling OLWM to not grab the help key, with the null binding
@samp{OpenWindows.KeyboardCommand.Help:}.


@node 8.10.
@section 8.10. How can you type in special characters in XEmacs?

One way is to use the package @file{x-compose}.  Then you can use sequences
like @kbd{Compose " a} to get d (a-umlaut), etc.



@node 9. The cursor, 10. The mouse; cutting and pasting, 8. The keyboard, top
@chapter 9. The cursor

@menu
* 9.1.::          9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?
* 9.2.::          9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?
@end menu


@node 9.1.
@section 9.1. Is there a way to make the bar cursor a little thicker than one-pixel thick since I lose it?

For a 1 pixel bar cursor, use:

@example
(setq bar-cursor t)
@end example

For a 2 pixel bar cursor, use:

@example
(setq bar-cursor 'anything-else)
@end example

You can use a color to make it stand out better:

@example
Emacs*cursorColor:	Red
@end example


@node 9.2.
@section 9.2. On the same subject -- is there a way to get back the old "block" cursor where the cursor covers the character in front of the point?

@example
(setq bar-cursor nil)
@end example



@node 10. The mouse; cutting and pasting, 11. Highlighting, 9. The cursor, top
@chapter 10. The mouse; cutting and pasting

@menu
* 10.1.::          10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?
* 10.2.::          10.2. How do I set control/meta/etc modifiers on mouse buttons?
* 10.3.::          10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.
* 10.4.::          10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?
* 10.5.::          10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?
* 10.6.::          10.6. How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?
* 10.7.::          10.7. How do I select a rectangular region?
* 10.8.::          10.8. Why does M-w take so long?
@end menu


@node 10.1.
@section 10.1. I keep hitting the middle mouse button by accident and getting stuff pasted into my buffer so how can I turn this off?

Here is an alternative binding, whereby the middle mouse button selects (but
does not cut) the expression under the mouse. Clicking middle on a left or
right paren will select to the matching one.  Note that you can use
@code{define-key} or @code{global-set-key}.

@example
(defun Mouse-Set-Point-and-Select (event)
  "Sets the point at the mouse location, then marks following form"
  (interactive "@@e")
  (mouse-set-point event)
  (mark-sexp 1)
  )
(define-key global-map 'button2 'Mouse-Set-Point-and-Select)
@end example

@c Get this fixed
(Editor's Note -- there is a problem with texinfo/text/html conversion, so
the double at-sign should only be a single, above.  I'll fix it one of these
days -- AJR)


@node 10.2.
@section 10.2. How do I set control/meta/etc modifiers on mouse buttons?

Use, for instance, @code{[(meta button1)]}. For example, here is a
common setting for Common Lisp programmers who use the bundled ilisp
package, whereby meta-button1 on a function name will find the file
where the function name was defined, and put you at that location in
the source file.

[Inside a function that gets called by the lisp-mode-hook and ilisp-mode-hook] 
@example
(local-set-key [(meta button1)] 'edit-definitions-lisp)
@end example


@node 10.3.
@section 10.3. I do "^x ^b" to get a list of buffers and the entries get highlighted when I move the mouse over them but clicking the left mouse does not do anything.

Use the middle mouse button.


@node 10.4.
@section 10.4. How can I get a list of buffers to popup when I hit button 3 on the mouse?

The following code will actually replace the default popup on button3:

@example
(defun cw-build-buffers ()
  "Popup buffer menu."
  (interactive "@@")
  (run-hooks 'activate-menubar-hook)
  (popup-menu (car (find-menu-item current-menubar '("Buffers")))))

(define-key global-map [(button3)] 'cw-build-buffers)
@end example

@c Get this fixed

(Editor's Note -- there is a problem with texinfo/text/html conversion, so
the double at-sign should only be a single, above.  I'll fix it one of these
days -- AJR)


@node 10.5.
@section 10.5. Why does cut-and-paste not work between XEmacs and a cmdtool?

We don't know.  It's a bug.  There does seem to be a work-around,
however.  Try running xclipboard first.  It appears to fix the problem
even if you exit it.  (This should be mostly fixed in 19.13, but we
haven't yet verified that).


@node 10.6.
@section 10.6.  How I can set XEmacs up so that it pastes where the cursor is _not_ where the pointer lies?


Try adding the following to your @file{.emacs}:

@example
(define-key global-map 'button2 'x-insert-selection)
@end example

This comes from the @file{sample.emacs} file in @file{etc/}, which has
lots of goodies.


@node 10.7.
@section 10.7. How do I select a rectangular region?


Just select the region normally, then use the rectangle commands (e.g.
@code{kill-rectangle}) on it.  The region does not highlight as a
rectangle, but the commands work just fine.

To actually sweep out rectangular regions with the mouse do the
following:

@example
(setq mouse-track-rectangle-p t)
@end example


@node 10.8.
@section 10.8. Why does M-w take so long?

It actually doesn't.  It leaves the region visible for a second so that
you can see what area is being yanked.  If you start working, though, it
will immediately complete its operation.  In other words, it will only
delay for a second if you let it.


@node 11. Highlighting, 12. The menubar and toolbar, 10. The mouse; cutting and pasting, top
@chapter 11. Highlighting

@menu
* 11.1.::          11.1. How can I highlight selections?
* 11.2.::          11.2. How do I get a pending-delete type of behavior?
* 11.3.::          11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath.  How do I turn it off?
* 11.4.::          11.4. The text gets highlighted when I do C-x C-p (mark-page).  Is there a way to turn this feature off?
@end menu


@node 11.1.
@section 11.1. How can I highlight selections?

Use zmacs mode.  This mode allows for what some might call gratuitous
highlighting for selected regions (either by setting mark or by using the
mouse).  To use, add the following line to your @file{.emacs} file:

@example
(setq zmacs-regions t)
@end example

This is the default behavior.


@node 11.2.
@section 11.2. How do I get a pending-delete type of behavior?

@dfn{Pending delete} is what happens when you select a region (with the
mouse or keyboard) and you press a key to replace the selected region by
the key you typed.  Usually backspace kills the selected region.

To get this behavior, add the following line to your @file{.emacs} file:

@example
(require 'pending-del)
@end example


@node 11.3.
@section 11.3. I do not like my text highlighted while I am doing isearch as I am not able to see whats underneath.  How do I turn it off?

@example
(setq isearch-highlight nil)
@end example

Note also that isearch-highlight affects query-replace and ispell.  Instead
of disabling isearch-highlight you may find that a better solution consists
of customizing the 'isearch' face.


@node 11.4.
@section 11.4. The text gets highlighted when I do C-x C-p (mark-page).  Is there a way to turn this feature off?

@example
(setq zmacs-regions nil)
@end example



@node 12. The menubar and toolbar, 13. Scrollbars, 11. Highlighting, top
@chapter 12. The menubar and toolbar

@menu
* 12.1.::          12.1. How do I get rid of the menu (or menubar) ?
* 12.2.::          12.2. Can I customize the basic menubar?
* 12.3.::          12.3. What controls how many buffers are listed in the menu "Buffers" list?
* 12.4.::          12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.

@end menu


@node 12.1.
@section 12.1. How do I get rid of the menu (or menubar) ?

Answer: To get rid of the menubar, add to @file{.emacs}:

@example
(set-menubar nil)
@end example


@node 12.2.
@section 12.2. Can I customize the basic menubar?

For an extensive menubar, add the line

@example
(load "big-menubar")
@end example

to your @file{.emacs} file.  If you'd like to write your own, this file
provides a good set of examples to start from:

@example
lisp/packages/big-menubar.el
@end example

(starting from your system XEmacs installation directory).


@node 12.3.
@section 12.3. What controls how many buffers are listed in the menu "Buffers" list?

Add the following to your @file{.emacs}, modified as needed:

@example
(setq buffers-menu-max-size 20)
@end example

If you do not want a limit, try

@example
(setq buffers-menu-max-size nil)
@end example


@node 12.4.
@section 12.4. I am trying to use a resource like @code{Emacs*menubar*font} to set the font of the menubar but it's not working.

If you are using the real Motif menubar, this resource is not recognized;
you have to say

@example
Emacs*menubar*fontList: FONT
@end example

If you are using the Lucid menubar, the former resource will be recognized
only if the latter resource is unset.  This means that the resource

@example
*fontList: FONT
@end example

will override

@example
Emacs*menubar*font: FONT
@end example

even though the latter is more specific.


@node 13. Scrollbars, 14. Frame Geometry, 12. The menubar and toolbar, top
@chapter 13. Scrollbars

@menu
* 13.1.::          13.1. How can I disable the scrollbar?
* 13.2.::          13.2. How can one use resources to change scrollbar colors?
* 13.3.::          13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior.  Is this a bug or a feature?  Can I disable it?
@end menu


@node 13.1.
@section 13.1. How can I disable the scrollbar?

To turn disable them for all frames, add the following line to
your @file{.Xdefaults}:

@example
Emacs.scrollBarWidth:  0
@end example

To turn the scrollbar off on a per-frame basis, use the following function:

@example
(set-specifier scrollbar-width (cons (selected-frame) 0))
@end example

You can actually turn the scrollbars on at any level you want by
substituting for (selected-frame) in the above command.  For example, to
turn the scrollbars off only in a single buffer:

@example
(set-specifier scrollbar-width (cons (current-buffer) 0))
@end example


@node 13.2.
@section 13.2. How can one use resources to change scrollbar colors?

Here's a recap of how to use resources to change your scrollbar colors:

@example
! Motif scrollbars

Emacs*XmScrollBar.Background: skyblue
Emacs*XmScrollBar.troughColor: lightgray

! Athena scrollbars

Emacs*Scrollbar.Foreground: skyblue
Emacs*Scrollbar.Background: lightgray
@end example

Note the capitalization of @samp{Scrollbar} for the Athena widget.


@node 13.3.
@section 13.3. When I move the scrollbar in an XEmacs window, it moves the point as well, which should not be the default behavior.  Is this a bug or a feature?  Can I disable it?

The current behavior is a feature, not a bug.  Point remains at the same
buffer position as long as that position does not scroll off the screen.  In
that event, point will end up in either the upper-left or lower-left hand
corner.



@node 14. Frame Geometry, 15. Window/icon title; window manager problems, 13. Scrollbars, top
@chapter 14. Frame Geometry

@menu
* 14.1.::          14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.
* 14.2.::          14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.
@end menu


@node 14.1.
@section 14.1. In Lucid Emacs 19.6 I did @code{(set-screen-width @var{characters})} and @code{(set-screen-height @var{lines})} in my @file{.emacs} instead of specifying @samp{Emacs*EmacsScreen.geometry} in my @file{.Xdefaults} but this does not work in XEmacs 19.13.

These two functions now take frame arguments:

@example
(set-frame-width (selected-frame) @var{characters})   
(set-frame-height (selected-frame) @var{lines})
@end example

@node 14.2.
@section 14.2. In XEmacs 19.11 I specified @samp{Emacs*EmacsScreen.geometry} in my @file{.emacs} but this does not work in XEmacs 19.13.

We have switched from using the term 'screen' to using the term 'frame'.
The correct entry for your @file{.Xdefaults} is now:

@example
Emacs*EmacsFrame.geometry
@end example


@node 15. Window/icon title; window manager problems, 16. Editing source code (C mode; Lisp mode; etc.), 14. Frame Geometry, top
@chapter 15. Window/icon title; window manager problems

@menu
* 15.1.::          15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?
* 15.2.::          15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?
* 15.3.::          15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}.  This is the way it's supposed to work, I think.  When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}.  It's still @samp{emacs}.  What does @samp{xemacs -name} really do?  The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail.  I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky.  What gives?
@end menu


@node 15.1.
@section 15.1. How can I get the icon to just say @samp{XEmacs} and not include the name of the current file in it?

Add the following line to your @file{.emacs} file:

@example
(setq frame-icon-title-format "XEmacs")
@end example


@node 15.2.
@section 15.2. How can I have the window title area display the full directory/name of the current buffer file and not just the name?

Add the following line to your @file{.emacs} file:

@example
(setq frame-title-format "%S: %f")
@end example
A more sophisticated title might be:

@example
(setq frame-title-format
  '("%S: " (buffer-file-name "%f" (dired-directory dired-directory "%b"))))
@end example

That is, use the file name, or the dired-directory, or the buffer name.


@node 15.3.
@section 15.3. When I run @samp{xterm -name junk} I get an xterm whose class name according to xprop, is @samp{junk}.  This is the way it's supposed to work, I think.  When I run @samp{xemacs -name junk} the class name is not set to @samp{junk}.  It's still @samp{emacs}.  What does @samp{xemacs -name} really do?  The reason I ask is that my window manager (fvwm) will make a window sticky and I use XEmacs to read my mail.  I want that XEmacs window to be sticky, without having to use the window manager's function to set the window sticky.  What gives?

@samp{xemacs -name} sets the application-name for the program (that is,
the thing which normally comes from @code{argv[0]}.)  Using @samp{-name}
is the same as making a copy of the executable with that new name.  The
WM_CLASS property on each frame is set to the frame-name, and the
application-class.  So, if you did @samp{xemacs -name FOO} and then
created a frame named @samp{BAR}, you'd get an X window with WM_CLASS =
@samp{( "BAR", "Emacs")}.  However, the resource hierarchy for this
widget would be

@example
Name:    FOO  .shell.       .pane        .BAR
Class:   Emacs.TopLevelShell.XmMainWindow.EmacsFrame
@end example

instead of the default

@example
Name:    xemacs.shell.       .pane        .emacs
Class:   Emacs .TopLevelShell.XmMainWindow.EmacsFrame
@end example

It is arguable that the first element of WM_CLASS should be set to the
application-name instead of the frame-name, but I think that's less
flexible, since it does not give you the ability to have multiple
frames with different WM_CLASS properties.  Another possibility would
be for the default frame name to come from the application name instead
of simply being @samp{emacs}.  However, at this point, making that
change would be troublesome: it would mean that many users would have to
make yet another change to their resource files (since the default
frame name would suddenly change from @samp{emacs} to @samp{xemacs}, or
whatever the executable happened to be named), so we'd rather avoid it.

To make a frame with a particular name use:

@example
(make-frame '((name . "the-name")))
@end example



@node 16. Editing source code (C mode; Lisp mode; etc.), 17. Text mode, 15. Window/icon title; window manager problems, top
@chapter 16. Editing source code (C mode; Lisp mode; etc.)

@menu
* 16.1.::          16.1. How can I do source code highlighting using font-lock?
* 16.2.::          16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?
* 16.3.::          16.3. I do not like cc-mode.  How do I use the old c-mode?
* 16.4.::          16.4. When I try to edit a postscript file it gets stuck saying:  fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again. 
* 16.5.::          16.5.  Does anyone know how to get the "More" Syntax Highlighting on by default? 
@end menu


@node 16.1.
@section 16.1. How can I do source code highlighting using font-lock?

For most modes, font-lock is already set up and just needs to be turned
on.  This can be done by 

@example
M-x font-lock-mode 
@end example

or by having XEmacs automatically start it by adding lines like

@example
(add-hook 'emacs-lisp-mode-hook	'turn-on-font-lock)
(add-hook 'dired-mode-hook	'turn-on-font-lock)
@end example

to your @file{.emacs}.  See the file @code{etc/sample.emacs} for more
examples.


@node 16.2.
@section 16.2. How do you arrange it so that XEmacs indents all the clauses of a Common Lisp @code{if} the same amount instead of indenting the 3rd clause differently from the first two?

One way is to add, to @file{.emacs}:

@example
(put 'if 'lisp-indent-function nil)
@end example

However, note that the package @file{cl-indent.el} that comes with
XEmacs sets up this kind of indentation by default.  @file{cl-indent} also
knows about many other CL-specific forms.  To use @file{cl-indent}, one can
do this:

@example
(load "cl-indent")
(setq lisp-indent-function (function common-lisp-indent-function))
@end example

One can also customize @file{cl-indent.el} so it mimics the default @samp{if}
indentation (@samp{then} indented more than the @samp{else}). Here's
how:

@example
(put 'if 'common-lisp-indent-function '(nil nil &body))
@end example

Also, a new version (1.2) of @file{cl-indent.el} was posted to
@samp{comp.emacs.xemacs} on 12/9/94. This version includes more
documentation than previous versions.  This may prove useful if you
need to customize any indent-functions.  The post can be retrieved by
searching the XEmacs mail archives.


@node 16.3.
@section 16.3. I do not like cc-mode.  How do I use the old c-mode?

Well, first off, consider if you really want to do this.  cc-mode is
much more powerful than the old c-mode.  But if you still insist, add
the following lines to your @file{.emacs}:

@example
(fmakunbound 'c-mode)
(makunbound 'c-mode-map)
(fmakunbound 'c++-mode)
(makunbound 'c++-mode-map)
(makunbound 'c-style-alist)
(load-library "old-c-mode")
(load-library "old-c++-mode")	
@end example

This must be done before any other reference is made to either c-mode
or c++-mode.


@node 16.4.
@section 16.4. When I try to edit a postscript file it gets stuck saying:  fontifying 'filename' (regexps....) and it just sits there. If I press ctrl-c in the window where XEmacs was started, it suddenly becomes alive again. 

This was caused by a bug in the Postscript font-lock regular
expressions.  It should be fixed in 19.13.  For earlier versions of
XEmacs, have a look at your @file{.emacs} file.  You will probably have
a line like:

@example
(add-hook 'postscript-mode-hook	'turn-on-font-lock)
@end example

Take it out, restart XEmacs, and it won't try to fontify your
postscript files anymore.


@node 16.5.
@section 16.5.  Does anyone know how to get the "More" Syntax Highlighting on by default? 

For C, C++, and Lisp, you can try adding the following to your @file{.emacs} file:

@example
(setq c-font-lock-keywords c-font-lock-keywords-2)
(setq c++-font-lock-keywords c++-font-lock-keywords-2)
(setq lisp-font-lock-keywords lisp-font-lock-keywords-2)
@end example



@node 17. Text mode, 18. Shell mode, 16. Editing source code (C mode; Lisp mode; etc.), top
@chapter 17. Text mode

@menu
* 17.1.::          17.1. How can I enable auto-indent?
* 17.2.::          17.2. How can I get XEmacs to come up in text mode (auto-fill) by default? 
@end menu


@node 17.1.
@section 17.1. How can I enable auto-indent?

Put the following line in your @file{.emacs}.

@example
(setq indent-line-function 'indent-relative-maybe)
@end example

If you want to get fancy, try @file{filladapt} and @file{fa-extras},
available from the Emacs Lisp Archive at Ohio State University.
@ifinfo
Get them at URL:

@example
ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages
@end example
@end ifinfo
@ifhtml
Get them at 
<A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/packages/</A>
@end ifhtml


@node 17.2.
@section 17.2. How can I get XEmacs to come up in text mode (auto-fill) by default? 

Try the following lisp in your @file{.emacs} file

@example
(setq default-major-mode 'text-mode)
(setq text-mode-hook 'turn-on-auto-fill)
@end example

WARNING: note that changing default-major-mode from fundamental-mode can
break a large amount of built-in code that expects newly created buffers to
be in fundamental-mode.  (Changing from fundamental-mode to auto-fill
text-mode might not wreak too much havoc, but changing to something more
exotic like a lisp-mode would break many Emacs packages.

Note that Emacs defaultly starts up in buffer *scratch* in
initial-major-mode, which defaults to lisp-interaction-mode. Thus
adding the following form to your Emacs init file will cause the
initial *scratch* buffer to be put into auto-fill'ed text-mode.

@example
(setq initial-major-mode
      (function (lambda ()
        (text-mode)
        (turn-on-auto-fill))))
@end example

Note that after your init file is loaded, if inhibit-startup-message
is null (the default) and the startup buffer is *scratch* then the
startup message will be inserted into *scratch*; it will be removed
after a timeout by erasing the entire *scratch* buffer. Keep in mind
this default usage of *scratch* if you desire any prior manipulation
of *scratch* from within your Emacs init file. In particular, anything
you insert into *scratch* from your init file will be later erased.
Also, if you change the mode of *scratch* be sure that this will
not interfere with possible later insertion of the startup message
(e.g. if you put *scratch* into a nonstandard mode that has automatic
font lock rules, then the startup message might get fontified in
a strange foreign manner, e.g. as code in some programming language).



@node 18. Shell mode, 19. Mail; VM; GNUS; BBDB; and related, 17. Text mode, top
@chapter 18. Shell mode

@menu
* 18.1.::          18.1. How do I start up a second shell buffer?
* 18.2.::          18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it.  Everything works fine except that now all ^M's are filtered out by Emacs.  Fixes? 
* 18.3.::          18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.
@end menu


@node 18.1.
@section 18.1. How do I start up a second shell buffer?

In the *shell* buffer:

@example
M-x rename-buffer RET *shell-1* RET
M-x shell RET
@end example

This will then start a second shell.  The key is that no buffer named
*shell* can exist.  It might be preferable to use @kbd{M-x
rename-uniquely} to rename the *shell* buffer instead of @kbd{M-x
rename-buffer}.


@node 18.2.
@section 18.2. I'm using the Emacs @kbd{M-x shell} function, and I would like to invoke and use a telnet session within it.  Everything works fine except that now all ^M's are filtered out by Emacs.  Fixes? 

Use @kbd{M-x rsh} or @kbd{M-x telnet} to open remote sessions rather
than doing rsh or telnet within the local shell buffer.


@node 18.3.
@section 18.3. If I type a very long command line (like a compile command) into a shell buffer, the output seems to be messed up.

If you see lots of ^G's in the buffer, you're using an old version of
XEmacs.  If the command line seems to be delayed or split into pieces,
you are probably using csh with the @samp{filec} variable set.  To fix
this, add the following line to your @file{.cshrc}, after @samp{filec} is set:

@example
if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
@end example

@node 19. Mail; VM; GNUS; BBDB; and related, 20. Printing, 18. Shell mode, top
@chapter 19. Mail; VM; GNUS; BBDB; and related

@menu
* 19.1.::          19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?
* 19.2.::          19.2. I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files).  What and where is it?
* 19.3.::          19.3. Is there any way to add more faces and regexps to GNUS without hacking gnus.el?
* 19.4.::          19.4. What is BBDB?
* 19.5.::          19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?
* 19.6.::          19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB.  What do I do?
* 19.7.::          19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM.  What do I do?
@end menu


@node 19.1.
@section 19.1. How and where I am suppose to set the face attributes for customizing the appearance of messages (i.e. for VM)?

Suppose you want to use:

@example
(set-face-font 'message-highlighted-header-contents
               "-adobe-courier-bold-r-normal--12*")
(set-face-foreground 'message-headers "darkslateblue")
(set-face-foreground 'message-header-contents "brown")
(set-face-foreground 'message-highlighted-header-contents "black")
(set-face-foreground 'message-cited-text "darkgreen")
@end example

Well, this should work, provided that @code{(require
'highlight-headers)} is executed first.  Also, highlight-headers is
self-contained and you don't need to turn on font-lock mode.


@node 19.2.
@section 19.2.  I seem to have heard that there's a package distributed with XEmacs which will use the echo area to notify you of incoming mail in a rather configurable way (multiple spool files, different actions for different files).  What and where is it?

It's called reportmail.  Add the following to your @file{.emacs}:

@example
(load-library "reportmail")
@end example


@node 19.3.
@section 19.3.  Is there any way to add more faces and regexps to GNUS without hacking gnus.el?

You can try the folowing elisp:

@example
(add-hook 'gnus-startup-hook
          '(lambda ()
              (font-lock-mode)
              (set-face-foreground 'message-headers "red")
              (set-face-foreground 'message-header-contents "orange")
              (set-face-foreground 'message-cited-text "blue")))
@end example


@node 19.4.
@section 19.4.  What is BBDB?

BBDB is the Big Brother Database, written by Jamie Zawinski
<jwz@@netscape.com>.  It interfaces to VM, mh-e, and GNUS and
conveniently snarfs information about people and other things from
articles and messages that go by.

BBDB is available from the elisp archive

@ifinfo
@example
archive.cis.ohio-state.edu:/pub/gnu/emacs/elisp-archive
@end example
@end ifinfo
@ifhtml
<A HREF="ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/">ftp://archive.cis.ohio-state.edu/pub/gnu/emacs/elisp-archive/</A>
@end ifhtml

BBDB has a mailing list devoted to it:

@example
info-bbdb@@cs.uiuc.edu
@end example

This mailing list is archived at

@ifinfo
@example
ftp.cs.uiuc.edu:/pub/bbdb
@end example
@end ifinfo
@ifhtml
<A
HREF="ftp://ftp.cs.uiuc.edu:/pub/bbdb/">ftp.cs.uiuc.edu:/pub/bbdb/</A>
@end ifhtml


@node 19.5.
@section 19.5. I noticed that BBDB evokes an XEmacs bug; is there a fix?

This worked for me:

@example
(setq bbdb-electric-p nil)
@end example

@node 19.6.
@section 19.6. I'm getting the error 'Wrong type argument: listp :-pos' when I try to start BBDB.  What do I do?

Discard the copy of mail-extr.el that came with bbdb.

XEmacs 19.12 made the change that you cannot change the value of
interned symbols whose names begin with a colon.  The mail-extr.el
that's distributed with 19.12+ is fixed to live with this restriction,
but old copies of mail-extr.el will bomb.


@node 19.7.
@section 19.7. I'm getting the error 'movemail: Permission denied' when I try and start VM.  What do I do?

Execute the following two commands.  movemail is normally located in the
XEmacs install tree at @file{.../lib/xemacs-19.13/$@{arch@}/movemail}.

@example
        chgrp mail movemail
        chmod 2555 movemail
@end example


@node 20. Printing, 21. Gnuserv, 19. Mail; VM; GNUS; BBDB; and related, top
@chapter 20. Printing

@menu
* 20.1.::          20.1. Font-lock looks nice.  How can I print (WYSIWYG) the highlighted document?
* 20.2.::          20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?
@end menu


@node 20.1.
@section 20.1. Font-lock looks nice.  How can I print (WYSIWYG) the highlighted document?

The package ps-print.el, which is now included with XEmacs, provides the
ability to do this.  It contains complete instructions on its use:

@example
<xemacs_src_root>/lisp/packages/ps-print.el
@end example


@node 20.2.
@section 20.2. My printer is a Postscript printer and @code{lpr} only works for Postscript files, so how do I get @kbd{M-x lpr-region} and @kbd{M-x lpr-buffer} to work?

@example
(setq lpr-command "@var{Command to print text files}")
@end example

Please don't forget to replace @var{Command to print text files} with the
actual command (@samp{enscript}, @samp{nenscript}, etc.)!



@node 21. Gnuserv, 22. Miscellaneous, 20. Printing, top
@chapter 21. Gnuserv

@menu
* 21.1.::          21.1. How do I disable gnuserv from opening a new frame?
* 21.2.::          21.2. What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?
@end menu


@node 21.1.
@section 21.1. How do I disable gnuserv from opening a new frame?

If you set the gnuserv-screen variable to the frame that should be
used to display buffers that are pulled up, a new frame will not be
created. For example, you could put

@example
(setq gnuserv-screen (selected-frame))
@end example

early on in your @file{.emacs}, to ensure that the first frame created is
the one used for your gnuserv buffers. 


@node 21.2.
@section 21.2.  What do I do to start the gnuserv server so that each subseqeuent XEmacs is a client?

Put the following in your @file{.emacs} file to start the server:

@example
(gnuserv-start)
@end example

Start your first XEmacs as usual.  After that, you can do

@example
gnuclient randomfilename
@end example

from the command line to get your existing XEmacs process to open a new
frame and visit randomfilename in that window. When you're done editing
randomfilename, hit @kbd{C-x #} to kill the buffer and get rid of the
frame.



@node 22. Miscellaneous,, 21. Gnuserv, top
@chapter 22. Miscellaneous

@menu
* 22.1.::          22.1. How do I specify the paths that XEmacs uses for finding files?
* 22.2.::          22.2. Why does edt emulation not work?
* 22.3.::          22.3. How can I emulate VI and use it as my default mode?
* 22.4.::          22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?
* 22.5.::          22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}.  I have no idea how it got there nor do I know what it does.  What is it?
* 22.6.::          22.6. How do I turn off the sound?
* 22.7.::          22.7. Can I have the end of the buffer delimited in some way? Say, with:   [END] ?
* 22.8.::          22.8. Can I insert today's date into buffer?
* 22.9.::          22.9. Are only certain syntactic character classes available for abbrevs?  I didn't see any restrictions in the info.
* 22.10.::         22.10. Filladapt used to work after I loaded it.  Now in 19.13 it doesn't.  What gives?
@end menu


@node 22.1.
@section 22.1. How do I specify the paths that XEmacs uses for finding files?

You can specify what paths to use by using a number of different flags
when running configure.  See the section MAKE VARIABLES in the top-level
file INSTALL in the XEmacs distribution for a listing of those flags.

Most of the time, however, the simplest fix is: DO NOT specify paths as
you might for FSF GNU Emacs.  XEmacs can generally determine the
necessary paths dynamically at run time.  The only path that generally
needs to be specified is the root directory to install into.  That can
be specified by passing the @code{--prefix} flag to configure.  For a
description of the XEmacs install tree, please consult the NEWS file.


@node 22.2.
@section 22.2. Why does edt emulation not work?

We don't know, but you can use tpu-edt emulation instead, which works fine
and is a little fancier than the standard edt emulation.  To do this, add
the following line to your @file{.emacs}:

@example
(load "tpu-edt")
@end example

If you don't want it to replace Ctrl-h with edt-style help menu add this as
well:

@example
(global-set-key '(control h) 'help-for-help)
@end example


@node 22.3.
@section 22.3. How can I emulate VI and use it as my default mode?

Our recommended VI emulator is viper.  To put the current buffer into
viper-mode, use the command:

@example
M-x viper
@end example

To make viper-mode the default, add the following lines to your @file{.emacs}:

@example
(load-library "viper")
(setq term-setup-hook 'viper)
(setq find-file-hooks 'viper)
(setq find-file-not-found-hooks 'viper)
@end example


@node 22.4.
@section 22.4. Is there some way to get the behavior so that if the current buffer has a file associated with it, the current buffer will use that files name else use the buffer name?

Just set frame-title-format from find-file-hooks.  Alternatively, look at
the answer to question 15.2.  

In addition, one could set modeline-format.


@node 22.5.
@section 22.5. I have no idea where this is coming from, but ever since I moved from 19.9 to 19.13 I have started seeing that all of my buffers will get a minor mode called @samp{Omit}.  I have no idea how it got there nor do I know what it does.  What is it?

It's part of dired.  In dired, you can type M-o to get Omit mode and that will
ignore uninteresting files (checkpoint files and backups, for example).  You
get Omit in the modeline everywhere because the variable `dired-omit-files-p'
is globally set to some non-nil value.  If you want this functionality, it's
probably best to use a hook:

@example
(add-hook 'dired-after-readin-hook '(lambda () (dired-omit-toggle)))
@end example

Alternatively, since  it seems odd to toggle the omit
state with every readin, since readin can happen many times in a Dired
buffer, you can try this hook to correct the "Omit" problem:

@example
(add-hook 'dired-mode-hook
  (function (lambda ()
      ;; `dired-omit-files-p' is made buffer-local by "dired-x.el", but
      ;; maybe not soon enough.
            (make-local-variable 'dired-omit-files-p)
            (setq dired-omit-files-p t))))
@end example

This is only run once, when the Dired buffer is created.


@node 22.6.
@section 22.6. How do I turn off the sound?

Add the following line to your @file{.emacs} file:

@example
(setq bell-volume 0)
(setq sound-alist nil)
@end example


@node 22.7.
@section 22.7. Can I have the end of the buffer delimited in some way? Say, with:   [END] ?

@example
(make-annotation "[END]" (point-max) 'text (current-buffer))
@end example

Note that you might want to put this in a hook.

You might also need:

@example
(require 'annotations)
@end example

since @code{make-annotation} is not defined by default.


@node 22.8.
@section 22.8. Can I insert today's date into buffer?

Use this lisp in a function:

@example
(insert (current-time-string))
@end example


@node 22.9.
@section 22.9. Are only certain syntactic character classes available for abbrevs?  I didn't see any restrictions in the info.

Yes, abbrevs only expand word-syntax strings.  So, in c-mode if you
wanted to expand something to @samp{define }, you would be able to
expand @samp{xd} but not @samp{#d}.


@node 22.10.
@section 22.10.  Filladapt used to work after I loaded it.  Now in 19.13 it doesn't.  What gives?

Filladapt 2.x is included in 19.13+.  In it filladapt is now a minor
mode and minor modes are traditionally off by default.  The following
added to your .emacs will turn it on for all buffers:

@example
(setq-default filladapt-mode t)
@end example

Use @code{turn-on-filladapt-mode} to turn Filladapt on in particular
major modes, like this:

@example
(add-hook 'text-mode-hook 'turn-on-filladapt-mode) 
@end example


@page
@contents
@bye
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.