File: msdog.texi

package info (click to toggle)
emacs-manual-ja 20.5-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 2,964 kB
  • ctags: 12
  • sloc: lisp: 119; ansic: 69; makefile: 43; sh: 28
file content (1344 lines) | stat: -rw-r--r-- 75,238 bytes parent folder | download | duplicates (3)
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
@c =============================================================
@c = $B85(B $BK](B $BLu(B: $BEDCfAo!wEl5~=w;RBg3X(B
@c = $B2CI.=$@5(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1998/11/25
@c = 20.4$B2~D{(B: $BBgLZFXM:!wBgDM(B.$BC^GHBg3X(B = 1999/09/14
@c =============================================================
@c This is part of the Emacs manual.
@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@node MS-DOS, Manifesto, Antinews, Top
@c @appendix Emacs and MS-DOS 
@appendix Emacs$B$H(BMS-DOS 
@cindex MS-DOG
@c @cindex MS-DOS peculiarities
@cindex MS-DOS$B$NJJ(B

@c   This section briefly describes the peculiarities of using Emacs under
@c the MS-DOS ``operating system'' (also known as ``MS-DOG'').  If you
@c build Emacs for MS-DOS, the binary will also run on Windows 3.X, Windows
@c NT, Windows 9X, or OS/2 as a DOS application; the information in this
@c chapter applies for all of those systems, if you use an Emacs that was
@c built for MS-DOS.
$B$3$3$G$O!"!J!X(BMS-DOG$B!Y$H$b8F$P$l$k!K(BMS-DOS$B!X%*%Z%l!<%F%#%s%0%7%9%F%`!Y$G(B
$B2TF/$9$k(BEmacs$B$NJJ$K$D$$$F4JC1$K$U$l$^$9!#(B
MS-DOS$BMQ$K:n@.$7$?(BEmacs$B$N%P%$%J%j$O!"(B
Windows 3.x$B!"(BWindows NT$B!"(BWindows 9X$B!"(BOS-2$B>e$G(B
DOS$B%"%W%j%1!<%7%g%s$H$7$F$bF0:n$7$^$9!#(B
MS-DOS$BMQ$K:n@.$7$?(BEmacs$B$r;H$C$F$$$k8B$j!"(B
$BK\>O$N>pJs$O$3$l$i$9$Y$F$N%7%9%F%`$K$"$F$O$^$j$^$9!#(B

@c   Note that it is possible to build Emacs specifically for Windows NT or
@c Windows 9X.  If you do that, most of this chapter does not apply;
@c instead, you get behavior much closer to what is documented in the rest
@c of the manual, including support for long file names, multiple frames,
@c scroll bars, mouse menus, and subprocesses.  However, the section on
@c text files and binary files does still apply.  There are also two
@c sections at the end of this chapter which apply specifically for Windows
@c NT and 9X.
Windows NT$B$d(BWindows 9X$B$K@lMQ$N(BEmacs$B$r:n$k$3$H$b2DG=$G$9!#(B
$B$=$N>l9g$K$O!"K\>O$N$[$H$s$I$O4X78$"$j$^$;$s!#(B
$BD9$$%U%!%$%kL>!"J#?t$N%U%l!<%`!"%9%/%m!<%k%P!<!"%^%&%9%a%K%e!<!"(B
$B%5%V%W%m%;%9$NMxMQ$r4^$a$F!"K\=q$NB>$NItJ,$G@bL@$7$?F0:n$K(B
$B6a$$F0:n$r$7$^$9!#(B
$B$7$+$7!"%F%-%9%H%U%!%$%k$H%P%$%J%j%U%!%$%k$K4X$9$k@a$OE,MQ$G$-$^$9!#(B
$B$^$?!"K\>O$N:G8e$N(B2$B$D$N@a$O!"(BWindows NT$B$H(B9X$B$@$1$KE,MQ$G$-$^$9!#(B

@menu
* Input: MS-DOS Input.         Keyboard and mouse usage on MS-DOS.
* Display: MS-DOS Display.     Fonts, frames and display size on MS-DOS.
* Files: MS-DOS File Names.    File name conventions on MS-DOS.
* Text and Binary::            Text files on MS-DOS use CRLF to separate lines.
* Printing: MS-DOS Printing.   How to specify the printer on MS-DOS.
* I18N: MS-DOS and MULE.       Support for internationalization on MS-DOS.
* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
* Windows Processes::          Running subprocesses on Windows.
* Windows System Menu::        Controlling what the ALT key does.
@end menu

@node MS-DOS Input
@c @section Keyboard and Mouse on MS-DOS
@section MS-DOS$B$N%-!<%\!<%I$H%^%&%9(B

@c @cindex Meta (under MS-DOS)
@c @cindex Hyper (under MS-DOS)
@c @cindex Super (under MS-DOS)
@cindex Meta $B!J(BMS-DOS$B!K(B
@cindex Hyper $B!J(BMS-DOS$B!K(B
@cindex Super $B!J(BMS-DOS$B!K(B
@vindex dos-super-key
@vindex dos-hyper-key
@c   The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
@c You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
@c choose either the right @key{CTRL} key or the right @key{ALT} key by
@c setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
@c or 2 respectively.  If neither @code{dos-super-key} nor
@c @code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
@c also mapped to the @key{META} key.  However, if the MS-DOS international
@c keyboard support program @file{KEYB.COM} is installed, Emacs will
@c @emph{not} map the right @key{ALT} to @key{META}, since it is used for
@c accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
@c layouts; in this case, you may only use the left @key{ALT} as @key{META}
@c key.
PC$B$N%-!<%\!<%I$N:8B&$N(B@key{ALT}$B%-!<$O!"(B@key{META}$B%-!<$K3d$jEv$F$i$l$^$9!#(B
@key{SUPER}$B%-!<$H(B@key{HYPER}$B%-!<$N%(%_%e%l!<%7%g%s$K$O!"A*Br;h$,(B2$B$D$"$j$^$9!#(B
$BJQ?t(B@code{dos-hyper-key}$B$H(B@code{dos-super-key}$B$r(B1$B$K$9$l$P!"(B
$B1&B&$N(B@key{CTRL}$B%-!<$rA*$S$^$9!#(B
$BJQ?t(B@code{dos-hyper-key}$B$H(B@code{dos-super-key}$B$r(B2$B$K$9$l$P!"(B
$B1&B&$N(B@key{ALT}$B%-!<$rA*$S$^$9!#(B
@code{dos-super-key}$B$H(B@code{dos-hyper-key}$B$N$$$:$l$b(B1$B$G$J$1$l$P!"(B
$B%G%U%)%k%H$G1&B&$N(B@key{ALT}$B%-!<$b(B@key{META}$B$K3d$jEv$F$i$l$^$9!#(B
$B$7$+$7!"(BMS-DOS$B$N9q:]2=%-!<%\!<%IMQ%W%m%0%i%`(B
@file{KEYB.COM}$B$r%$%s%9%H!<%k$7$F$"$k>l9g$O!"(B
$B1&B&$N(B@key{ALT}$B$r(B@key{META}$B$K$O3d$jEv$F(B@emph{$B$^$;$s(B}$B!#(B 
$B$H$$$&$N$O!"JF9qG[Ns$N%-!<%\!<%I$G$J$$>l9g!"(B
$B1&B&$N(B@key{ALT}$B$O(B@kbd{~}$B$d(B@kbd{@@}$B$H$7$F;H$o$l$k$+$i$G$9!#(B
$B$3$N>l9g$K$O!":8B&$N(B@key{ALT}$B$N$_$r(B@key{META}$B$H$7$F;H$($^$9!#(B

@c @kindex C-j @r{(MS-DOS)}
@kindex C-j @r{$B!J(BMS-DOS$B!K(B}
@vindex dos-keypad-mode
@c   The variable @code{dos-keypad-mode} is a flag variable that controls
@c what key codes are returned by keys in the numeric keypad.  You can also
@c define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
@c following line into your @file{_emacs} file:
$BJQ?t(B@code{dos-keypad-mode}$B$O!"(B
$B?t;z%-!<%Q%C%I>e$N%-!<$,JV$9%-!<%3!<%I$r@)8f$9$kJQ?t$G$9!#(B
$B%U%!%$%k(B@file{_emacs}$B$K$D$.$N9T$rF~$l$F$*$1$P!"(B
@key{ENTER}$B%-!<$,(B@kbd{C-j}$B$H$7$FF/$/$h$&$KDj5A$G$-$^$9!#(B

@smallexample
@c ;; Make the Enter key from the Numeric keypad act as C-j.
;; $B?t;z%-!<%Q%C%I$N(BEnter$B%-!<$r(BC-j$B$H$7$FF0:n$5$;$k!#(B
(define-key function-key-map [kp-enter] [?\C-j])
@end smallexample

@c @kindex DEL @r{(MS-DOS)}
@c @kindex BS @r{(MS-DOS)}
@kindex DEL @r{$B!J(BMS-DOS$B!K(B}
@kindex BS @r{$B!J(BMS-DOS$B!K(B}
@c   The key that is called @key{DEL} in Emacs (because that's how it is
@c designated on most workstations) is known as @key{BS} (backspace) on a
@c PC.  That is why the PC-specific terminal initialization remaps the
@c @key{BS} key to act as @key{DEL}; the @key{DEL} key is remapped to act
@c as @kbd{C-d} for the same reasons.
$B!J$[$H$s$I$N%o!<%/%9%F!<%7%g%s$G$N8F>N$+$i!K(B
Emacs$B$G(B@key{DEL}$B$H8F$P$l$k%-!<$O!"(BPC$B$G$O(B@key{BS}$B!J%P%C%/%9%Z!<%9!K$G$9!#(B
$B$3$N$?$a!"(BPC$BFCM-$NC<Kv=i4|2=$K$*$$$F$O!"(B
@key{BS}$B%-!<$O(B@key{DEL}$B$H$7$FF0:n$9$k$h$&$K$7$F$$$^$9!#(B
$BF1$8M}M3$+$i!"(B@key{DEL}$B%-!<$O(B @key{C-d}$B$H$7$FF0:n$9$k$h$&$K$7$F$"$j$^$9!#(B

@c @kindex C-g @r{(MS-DOS)}
@c @kindex C-BREAK @r{(MS-DOS)}
@c @cindex quitting on MS-DOS
@kindex C-g @r{$B!J(BMS-DOS$B!K(B}
@kindex C-BREAK @r{$B!J(BMS-DOS$B!K(B}
@cindex MS-DOS$B>e$G$NCfCG(B
@c   Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
@c character, just like @kbd{C-g}.  This is because Emacs cannot detect
@c that you have typed @kbd{C-g} until it is ready for more input.  As a
@c consequence, you cannot use @kbd{C-g} to stop a running command
@c (@pxref{Quitting}).  By contrast, @kbd{C-@key{BREAK}} @emph{is} detected
@c as soon as you type it (as @kbd{C-g} is on other systems), so it can be
@c used to stop a running command and for emergency escape
@c (@pxref{Emergency Escape}).
MS-DOS$BMQ$N(BEmacs$B$G$O!"(B
@kbd{C-@key{BREAK}}$B$r(B@kbd{C-g}$B$N$h$&$JCfCGJ8;z$H$7$FG'<1$7$^$9!#(B
$B$3$l$O!"(BEmacs$B$,F~NO$rFI$b$&$H$7$J$$$H(B
@kbd{C-g}$B$,BG80$5$l$?$3$H$r8!=P$G$-$J$$$+$i$G$9!#(B
$B$=$N$?$a!"F0:nCf$N%3%^%s%I$r;_$a$k$?$a$K(B@kbd{C-g}$B$r;H$($^$;$s(B
$B!J(B@pxref{Quitting}$B!K!#(B
$BBP>HE*$K!"(B@kbd{C-@key{BREAK}}$B$O(B
$B!JB>$N%7%9%F%`$G$N(B@kbd{C-g}$B$N$h$&$K!KBG80$9$k$H$9$0$K8!=P(B@emph{$B$5$l$k(B}$B$N$G!"(B
$BF0:nCf$N%3%^%s%I$rDd;_$7$?$j6[5^C&=P$7$?$j$9$k$?$a$K;H$($^$9(B
$B!J(B@pxref{Emergency Escape}$B!K!#(B

@c @cindex mouse support under MS-DOS
@cindex MS-DOS$B$G$N%^%&%9$NMxMQ(B
@c   Emacs on MS-DOS supports a mouse (on the default terminal only).
@c The mouse commands work as documented, including those that use menus
@c and the menu bar (@pxref{Menu Bar}).  Scroll bars don't work in
@c MS-DOS Emacs.  PC mice usually have only two buttons; these act as
@c @kbd{Mouse-1} and @kbd{Mouse-2}, but if you press both of them
@c together, that has the effect of @kbd{Mouse-3}.
MS-DOS$BMQ(BEmacs$B$O!"!J%G%U%)%k%H$NC<Kv$@$1$G!K%^%&%9$r;H$($^$9!#(B
$B%a%K%e!<$d%a%K%e!<%P!<!J(B@pxref{Menu Bar}$B!K$NMxMQ$r4^$a$F!"(B
$B%^%&%9%3%^%s%I$O%I%-%e%a%s%H$I$*$j$KF0:n$7$^$9!#(B
MS-DOS$BMQ(BEmacs$B$G$O%9%/%m!<%k%P!<$O;H$($^$;$s!#(B
PC$B$N%^%&%9$K$O!"DL>o!"(B2$B$D$N%\%?%s$7$+$"$j$^$;$s!#(B
$B$3$l$i$O(B@kbd{Mouse-1}$B$H(B@kbd{Mouse-2}$B$H$7$FF0:n$7$^$9$,!"(B
2$B$D$N%\%?%s$rF1;~$K2!$;$P(B@kbd{Mouse-3}$B$H$7$FF0:n$7$^$9!#(B

@c @cindex Windows clipboard support
@c   Emacs built for MS-DOS supports clipboard operations when it runs on
@c Windows.  Commands that put text on the kill ring, or yank text from the
@c ring, check the Windows clipboard first, just as Emacs does on X Windows
@c (@pxref{Mouse Commands}).  Only the primary selection and the cut buffer
@c are supported by MS-DOS Emacs on Windows; the secondary selection always
@c appears as empty.
@cindex Windows$B$N%/%j%C%W%\!<%I$NMxMQ(B
MS-DOS$BMQ(BEmacs$B$,(BWindows$B>e$GF0:n$7$F$$$k>l9g$K$O!"(B
$B%/%j%C%W%\!<%I$NA`:n$rMxMQ$G$-$^$9!#(B
$B%-%k%j%s%0$K%F%-%9%H$rCV$$$?$j!"(B
$B%-%k%j%s%0$+$i%F%-%9%H$r%d%s%/$7$?$j$9$k%3%^%s%I$G$O!"(B
X$B%&%#%s%I%&%7%9%F%`$N>l9g$HF1MM$K!"(B
$B$^$:(BWindows$B$N%/%j%C%W%\!<%I$rD4$Y$^$9!J(B@pxref{Mouse Commands}$B!K!#(B
Windows$B>e$N(BMS-DOS$BMQ(BEmacs$B$O!"(B
$B0l<!%;%l%/%7%g%s$H%+%C%H%P%C%U%!$N$_$rMxMQ$7!"(B
$BFs<!%;%l%/%7%g%s$O$D$M$K6u$G$9!#(B

@c   Due to the way clipboard access is implemented by Windows, the
@c length of text you can put into the clipboard is limited by the amount
@c of free DOS memory that is available to Emacs.  Usually, up to 620KB of
@c text can be put into the clipboard, but this limit depends on the system
@c configuration and is lower if you run Emacs as a subprocess of
@c another program.  If the killed text does not fit, Emacs prints a
@c message saying so, and does not put the text into the clipboard.
Windows$B$G<BAu$5$l$F$$$k%/%j%C%W%\!<%I$N;2>HJ}K!$N$?$a!"(B
$B%/%j%C%W%\!<%I$KCV$1$k%F%-%9%H$ND9$5$O!"(B
Emacs$B$,MxMQ$G$-$k(BDOS$B$N6u$-%a%b%jNL$K@)8B$5$l$^$9!#(B
$BDL>o!"(B620K$B%P%$%H$^$G$N%F%-%9%H$r%/%j%C%W%\!<%I$KCV$1$^$9$,!"(B
$B$3$N>e8B$O%7%9%F%`$N@_Dj$K0MB8$7!"(B
$BB>$N%W%m%0%i%`$N%5%V%W%m%;%9$H$7$F(BEmacs$B$r<B9T$7$F$$$k$H$-$K$O>/$J$/$J$j$^$9!#(B
$B:o=|$7$?%F%-%9%H$,%/%j%C%W%\!<%I$KF~$j$-$i$J$1$l$P!"(B
Emacs$B$O$=$N;]$N%a%C%;!<%8$r=PNO$7$F!"(B
$B%F%-%9%H$r%/%j%C%W%\!<%I$XCV$-$^$;$s!#(B

@c   Null characters also cannot be put into the Windows clipboard.  If the
@c killed text includes null characters, Emacs does not put such text into
@c the clipboard, and prints in the echo area a message to that effect.
Windows$B$N%/%j%C%W%\!<%I$K$O%J%kJ8;z$rF~$l$i$l$^$;$s!#(B
$B%-%k$7$?%F%-%9%H$K%J%kJ8;z$,4^$^$l$k>l9g$K$O!"(B
Emacs$B$O$=$N$h$&$J%F%-%9%H$r%/%j%C%W%\!<%I$XCV$-$^$;$s!#(B
$B$5$i$K!"%(%3!<NN0h$K$O!"$=$N;]!"%a%C%;!<%8$rI=<($7$^$9!#(B

@vindex dos-display-scancodes
@c   The variable @code{dos-display-scancodes}, when non-@code{nil},
@c directs Emacs to display the ASCII value and the keyboard scan code of
@c each keystroke; this feature serves as a complement to the
@c @code{view-lossage} command, for debugging.
$BJQ?t(B@code{dos-display-scancodes}$B$NCM$,(B@code{nil}$B0J30$N$H$-$K$O!"(B
$B%-!<$rBG$D$?$S$K!"(BEmacs$B$O3F%-!<$N(BASCII$B!J%3!<%I$N!KCM$H(B
$B%-!<%\!<%I%9%-%c%s%3!<%I$r=PNO$7$^$9!#(B
$B$3$N5!G=$O!"%G%P%C%0MQ$N%3%^%s%I(B@code{view-lossage}$B$rJd:4$7$^$9!#(B

@node MS-DOS Display
@c @section Display on MS-DOS
@c @cindex faces under MS-DOS
@c @cindex fonts, emulating under MS-DOS
@section MS-DOS$B$N2hLL(B
@cindex $B%U%'%$%9!J(BMS-DOS$B!K(B
@cindex $B%U%)%s%H$N%(%_%e%l!<%7%g%s!J(BMS-DOS$B!K(B

@c   Display on MS-DOS cannot use font variants, like bold or italic,
@c but it does support
@c multiple faces, each of which can specify a foreground and a background
@c color.  Therefore, you can get the full functionality of Emacs packages
@c that use fonts (such as @code{font-lock}, Enriched Text mode, and
@c others) by defining the relevant faces to use different colors.  Use the
@c @code{list-colors-display} command (@pxref{Frame Parameters}) and the
@c @code{list-faces-display} command (@pxref{Faces}) to see what colors and
@c faces are available and what they look like.
MS-DOS$B$N2hLL$G$O!"%\!<%k%IBN!JB@;zBN!K$d%$%?%j%C%/BN!J<PBN!K$J$I$N(B
$B%U%)%s%H$NJQ<o$r;H$($^$;$s$,!"(B
$B8D!9$KA07J?'$HGX7J?'$r;XDj$G$-$k%U%'%$%9$rJ#?t8D;H$($^$9!#(B
$B$7$?$,$C$F!"4XO"$9$k%U%'%$%9$K0[$J$kI=<(?'$rDj5A$9$l$P!"(B
$B!J(B@code{font-lock}$B!"%(%s%j%C%A!J(Benriched$B!K%b!<%I$J$I$N!K(B
$B%U%)%s%H$rMQ$$$k(BEmacs$B$N%Q%C%1!<%8$NA45!G=$rMxMQ$G$-$^$9!#(B
$B%3%^%s%I(B@code{list-colors-display}$B!J(B@pxref{Frame Parameters}$B!K$H(B
$B%3%^%s%I(B@code{list-faces-display}$B!J(B@pxref{Faces}$B!K$r;H$($P!"(B
$BMxMQ2DG=$J%U%'%$%9$HI=<(?'!"$=$l$i$N8+$(J}$rCN$k$3$H$,$G$-$^$9!#(B

@c   The section @ref{MS-DOS and MULE}, later in this chapter, describes
@c how Emacs displays glyphs and characters which aren't supported by the
@c native font built into the DOS display.
$BK\>O$N(B@ref{MS-DOS and MULE}$B$G$O!"(B
DOS$B$N2hLL$KAH$_9~$^$l$?%U%)%s%H$G$OI=$;$J$$(B
$B;z7A$dJ8;z$r(BEmacs$B$,$I$N$h$&$KI=<($9$k$+$r@bL@$7$^$9!#(B

@c @cindex frames on MS-DOS
@cindex $B%U%l!<%`!J(BMS-DOS$B!K(B
@c   Multiple frames (@pxref{Frames}) are supported on MS-DOS, but they all
@c overlap, so you only see a single frame at any given moment.  That
@c single visible frame occupies the entire screen.  When you run Emacs
@c from MS-Windows DOS box, you can make the visible frame smaller than
@c the full screen, but Emacs still cannot display more than a single
@c frame at a time.
MS-DOS$B$G$bJ#?t$N%U%l!<%`!J(B@pxref{Frames}$B!K$rMxMQ$G$-$^$9!#(B
$B$7$+$7!"$=$l$i$O$9$Y$F=E$J$C$F$$$k$N$G!"(B
$B0lEY$K$O(B1$B$D$N%U%l!<%`$7$+8+$k$3$H$,$G$-$^$;$s!#(B
$B8+$($F$$$k(B1$B$D$N%U%l!<%`$,2hLLA4BN$rJ$$$$^$9!#(B
MS-Windows$B$N(BDOS$B%\%C%/%9$G(BEmacs$B$r<B9T$7$F$$$k$H$-$K$O!"(B
$B8+$($F$$$k%U%l!<%`$r2hLLA4BN$h$j>.$5$/$O$G$-$^$9$,!"(B
$B$=$l$G$b!"0lEY$K(B1$B$D$N%U%l!<%`$7$+I=<($G$-$^$;$s!#(B

@c @cindex frame size under MS-DOS
@cindex $B%U%l!<%`%5%$%:!J(BMS-DOS$B!K(B
@findex mode4350
@findex mode25
@c   The @code{mode4350} command switches the display to 43 or 50
@c lines, depending on your hardware; the @code{mode25} command switches
@c to the default 80x25 screen size.
$B%3%^%s%I(B@code{mode4350}$B$O(B43$B9TI=<($H(B50$B9TI=<($r@Z$jBX$($^$9$,!"(B
$B%O!<%I%&%'%"$K0MB8$7$^$9!#(B
$B%3%^%s%I(B@code{mode25}$B$O!"%G%U%)%k%H$N(B80x25$B$N2hLL%5%$%:$K@Z$jBX$($^$9!#(B

@c   By default, Emacs only knows how to set screen sizes of 80 columns by
@c 25, 28, 35, 40, 43 or 50 rows.  However, if your video adapter has
@c special video modes that will switch the display to other sizes, you can
@c have Emacs support those too.  When you ask Emacs to switch the frame to
@c @var{n} rows by @var{m} columns dimensions, it checks if there is a
@c variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
@c uses its value (which must be an integer) as the video mode to switch
@c to.  (Emacs switches to that video mode by calling the BIOS @code{Set
@c Video Mode} function with the value of
@c @code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
@c For example, suppose your adapter will switch to 66x80 dimensions when
@c put into video mode 85.  Then you can make Emacs support this screen
@c size by putting the following into your @file{_emacs} file:
$B%G%U%)%k%H$G$O!"(BEmacs$B$O(B80$B7e$G!"(B25$B9T!"(B28$B9T!"(B35$B9T!"(B40$B9T!"(B43$B9T!"(B50$B9T$N(B
$B2hLL%5%$%:$7$+CN$j$^$;$s!#(B
$B$7$+$7!"%S%G%*%"%@%W%?$KJL$N2hLL%5%$%:$K@Z$jBX$($kFCJL$J(B
$B%S%G%*%b!<%I$,$"$l$P!"(BEmacs$B$G$b$=$l$i$rMxMQ$G$-$^$9!#(B
Emacs$B$K%U%l!<%`%5%$%:$r(B@var{n}$B9T(B@var{m}$B7e$K@Z$jBX$($k;X<($r$9$k$H!"(B
@code{screen-dimensions-@var{n}x@var{m}}$B$H$$$&JQ?t$,$"$k$+$I$&$+D4$Y$^$9!#(B
$BJQ?t$,$"$l$P!"$=$NCM!J@0?t$G$"$kI,MW$,$"$k!K$r(B
$B@Z$jBX$(@h$N%S%G%*%b!<%I$H$7$F;H$$$^$9!#(B
$B!J(BEmacs$B$O!"(B
@code{screen-dimensions-@var{n}x@var{m}}$B$NCM$r%l%8%9%?(B@code{AL}$B$KF~$l!"(B
BIOS$B$N4X?t(B@code{Set Video Mode}$B$r8F$S=P$7!"%S%G%*%b!<%I$r@Z$jBX$($^$9!#!K(B
$B$?$H$($P!"%S%G%*%b!<%I$r(B85$B$K$9$k$H(B66x80$B$N2hLL$K@Z$jBX$o$k%"%@%W%?$,$"$k$H$7$^$9!#(B
@file{_emacs}$B$K$D$.$N9T$r2C$($l$P!"(B
Emacs$B$G$3$N2hLL%5%$%:$r;H$($k$h$&$K$J$j$^$9!#(B

@example
(setq screen-dimensions-66x80 85)
@end example

@c   Since Emacs on MS-DOS can only set the frame size to specific
@c supported dimensions, it cannot honor every possible frame resizing
@c request.  When an unsupported size is requested, Emacs chooses the next
@c larger supported size beyond the specified size.  For example, if you
@c ask for 36x80 frame, you will get 40x80 instead.
MS-DOS$BMQ(BEmacs$B$G$O!"(B
$B%U%l!<%`%5%$%:$OMxMQ2DG=$JFCDj$N%5%$%:$K$7$+@_Dj$G$-$^$;$s$+$i!"(B
$B%U%l!<%`%5%$%:$NJQ99MW5a$9$Y$F$KEz$($i$l$k$o$1$G$O$"$j$^$;$s!#(B
$B;H$($J$$%5%$%:$,MW5a$5$l$k$H!"(B
Emacs$B$O;XDj$5$l$?%5%$%:$N$D$.$KBg$-$$%5%$%:$rA*$S$^$9!#(B
$B$?$H$($P!"(B36x80$B$N%U%l!<%`$rMW5a$9$k$H!"$+$o$j$K!"(B40x80$B$K$J$j$^$9!#(B

@c   The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
@c when they exactly match the specified size; the search for the next
@c larger supported size ignores them.  In the above example, even if your
@c VGA supports 38x80 dimensions and you define a variable
@c @code{screen-dimensions-38x80} with a suitable value, you will still get
@c 40x80 screen when you ask for a 36x80 frame.  If you want to get the
@c 38x80 size in this case, you can do it by setting the variable named
@c @code{screen-dimensions-36x80} with the same video mode value as
@c @code{screen-dimensions-38x80}.
$BJQ?t(B@code{screen-dimensions-@var{n}x@var{m}}$B$O!"(B
$B;XDj%5%$%:$K@53N$K0lCW$9$k$H$-$@$1;H$o$l$^$9!#(B
$BMxMQ2DG=$J$D$.$KBg$-$J%5%$%:$N8uJd$rC5$9$H$-$K$OL5;k$7$^$9!#(B
$B>e=R$NNc$G$O!"(BVGA$B$G(B38x80$B$r;H$($F!"(B
$BJQ?t(B@code{screen-dimensions-38x80}$B$KE,@Z$JCM$rDj5A$7$?$H$7$F$b!"(B
36x80$B$N%U%l!<%`$rMW5a$7$?>l9g$K$O!"(B40x80$B$N2hLL$K$J$C$F$7$^$$$^$9!#(B
$B$3$N$h$&$J>l9g$K(B38x80$B$N%5%$%:$K$7$?$1$l$P!"(B
$BJQ?t(B@code{screen-dimensions-36x80}$B$K$b(B
@code{screen-dimensions-38x80}$B$HF1$8%S%G%*%b!<%I$NCM$rF~$l$^$9!#(B

@c   Changing frame dimensions on MS-DOS has the effect of changing all the
@c other frames to the new dimensions.
MS-DOS$B$G$O!"%U%l!<%`%5%$%:$rJQ99$9$k$H!"(B
$BB>$N$9$Y$F$N%U%l!<%`$N%5%$%:$bJQ99$7$F$7$^$$$^$9!#(B

@node MS-DOS File Names
@c @section File Names on MS-DOS
@c @cindex file names under MS-DOS
@c @cindex init file, default name under MS-DOS
@section MS-DOS$B$K$*$1$k%U%!%$%kL>(B
@cindex $B%U%!%$%kL>!J(BMS-DOS$B!K(B
@cindex $B=i4|2=%U%!%$%k!"%G%U%)%k%HL>!J(BMS-DOS$B!K(B

@c   MS-DOS normally uses a backslash, @samp{\}, to separate name units
@c within a file name, instead of the slash used on other systems.  Emacs
@c on MS-DOS permits use of either slash or backslash, and also knows
@c about drive letters in file names.
$BB>$N%7%9%F%`$G$O%U%!%$%kL>$N9=@.MWAG$N6h@Z$j$K$O%9%i%C%7%e$r;H$$$^$9$,!"(B
MS-DOS$B$G$O!"IaDL!"%P%C%/%9%i%C%7%e(B@samp{\}$B$r;H$$$^$9!#(B
MS-DOS$BMQ(BEmacs$B$G$O!"%9%i%C%7%e$b%P%C%/%9%i%C%7%e$b;H$($F!"(B
$B$5$i$K!"%U%!%$%kL>$K4^$^$l$k%I%i%$%VL>$bM}2r$7$^$9!#(B

@c   On MS-DOS, file names are case-insensitive and limited to eight
@c characters, plus optionally a period and three more characters.  Emacs
@c knows enough about these limitations to handle file names that were
@c meant for other operating systems.  For instance, leading dots @samp{.}
@c in file names are invalid in MS-DOS, so Emacs transparently converts
@c them to underscores @samp{_}; thus your default init file (@pxref{Init
@c File}) is called @file{_emacs} on MS-DOS.  Excess characters before or
@c after the period are generally ignored by MS-DOS itself; thus, if you
@c visit the file @file{LongFileName.EvenLongerExtension}, you will
@c silently get @file{longfile.eve}, but Emacs will still display the long
@c file name on the mode line.  Other than that, it's up to you to specify
@c file names which are valid under MS-DOS; the transparent conversion as
@c described above only works on file names built into Emacs.
MS-DOS$B$G$O!"%U%!%$%kL>$KBgJ8;z>.J8;z$N6hJL$O$J$/(B
8$BJ8;z$K@)8B$5$l$^$9$,!"%T%j%*%I$H$5$i$K(B3$BJ8;z$rIU2C$G$-$^$9!#(B
Emacs$B$OB>$N%7%9%F%`8~$1$N%U%!%$%kL>$r07$&$&$($G!"(B
$B$3$l$i$N@)8B$r=OCN$7$F$$$^$9!#(B
$B$?$H$($P!"%I%C%H(B@samp{.}$B$G;O$^$k%U%!%$%kL>$O!"(B
MS-DOS$B$G$O@5$7$/$J$$$N$G!"(BEmacs$B$O$=$l$rF)2aE*$K2<@~(B@samp{_}$B$KJQ49$7$^$9!#(B
$B$7$?$,$C$F!"%G%U%)%k%H$N=i4|2=%U%!%$%k!J(B@pxref{Init File}$B!K$O!"(B
MS-DOS$B$G$O(B@file{_emacs}$B$H8F$P$l$^$9!#(B
$B%T%j%*%I$NA08e$NJ8;z?t@)8B$r1[$($?ItJ,$O!"(B
$BDL>o!"(BMS-DOS$B$,L5;k$7$^$9!#(B
$B$7$?$,$C$F!"%U%!%$%k(B@file{LongFileName.EvenLongerExtension}$B$rK,$l$k$H!"(B
$B<B:]$K$O(B@file{longfile.eve}$B$rK,$l$k$3$H$K$J$j$^$9$,!"(B
$B%b!<%I9T$K$O$b$H$ND9$$L>A0$,I=<($5$l$^$9!#(B
$B$3$l0J30$K$O!"(BMS-DOS$B$K$*$$$F@5$7$$%U%!%$%kL>$r;XDj$9$k$N$O!"(B
$B%f!<%6!<$N@UG$$G$9!#(B
$B>e=R$7$?F)2aE*$JJQ49$O!"(BEmacs$B$KAH$_9~$^$l$?%U%!%$%kL>$K$N$_$K:nMQ$7$^$9!#(B

@c @cindex backup file names on MS-DOS
@cindex $B%P%C%/%"%C%W%U%!%$%k$NL>A0!J(BMS-DOS$B!K(B
@c   The above restrictions on the file names on MS-DOS make it almost
@c impossible to construct the name of a backup file (@pxref{Backup
@c Names}) without losing some of the original file name characters.  For
@c example, the name of a backup file for @file{docs.txt} is
@c @file{docs.tx~} even if single backup is used.
MS-DOS$B$G$N>e=R$N%U%!%$%kL>$N@)8B$N$?$a$K!"(B
$B$b$H$N%U%!%$%kL>$NJ8;z$r$$$/$D$+<N$F$:$K(B
$B%P%C%/%"%C%W%U%!%$%k!J(B@pxref{Backup Names}$B!K$NL>A0$r9=@.$9$k$3$H$OIT2DG=$G$9!#(B
$B$?$H$($P!"%P%C%/%"%C%W$r(B1$B$D$7$+;H$C$F$$$J$/$F$b!"(B
@file{docs.txt}$B$N%P%C%/%"%C%W%U%!%$%k$NL>A0$O(B
@file{docs.tx~}$B$H$J$j$^$9!#(B

@c @cindex file names under Windows 95/NT
@c @cindex long file names in DOS box under Windows 95/NT
@cindex $B%U%!%$%kL>!J(BWindows 95/NT$B!K(B
@cindex $BD9$$%U%!%$%kL>!J(BWindows 95/NT$B2<$N(BDOS$B%\%C%/%9!K(B
@c   If you run Emacs as a DOS application under Windows 9X, you can
@c turn on support for long file names.  If you do that, Emacs doesn't
@c truncate file names or convert them to lower case; instead, it uses the
@c file names that you specify, verbatim.  To enable long file name
@c support, set the environment variable @code{LFN} to @samp{y} before
@c starting Emacs.  Unfortunately, Windows NT doesn't allow DOS programs to
@c access long file names, so Emacs built for MS-DOS will only see their
@c short 8+3 aliases.
Windows 9x$B>e$N(BDOS$B%"%W%j%1!<%7%g%s$H$7$F(BEmacs$B$r<B9T$9$k>l9g$K$O!"(B
$BD9$$%U%!%$%kL>$N;HMQ$rM-8z$K$G$-$^$9!#(B
$B$=$&$9$k$H!"(BEmacs$B$O!"%U%!%$%kL>$r@Z$j5M$a$?$j>.J8;z$KJQ49$7$?$j$;$:$K!"(B
$B;XDj$7$?$H$*$j$N%U%!%$%kL>$r$=$N$^$^;H$$$^$9!#(B
$BD9$$%U%!%$%kL>$N;HMQ$rM-8z$K$9$k$K$O!"(B
Emacs$B$r5/F0$9$k$^$($K!"4D6-JQ?t(B@code{LFN}$B$K(B@samp{y}$B$H@_Dj$7$^$9!#(B
$B;DG0$J$,$i!"(BWindows NT$B$G$O(BDOS$B%W%m%0%i%`$+$iD9$$%U%!%$%kL>$r;H$($^$;$s$N$G!"(B
MS-DOS$BMQ(BEmacs$B$+$i$OC;$$(B8+3$B$NJLL>$7$+8+$($^$;$s!#(B

@c @cindex @code{HOME} directory under MS-DOS
@cindex $B%[!<%`%G%#%l%/%H%j!J(BMS-DOS$B!K(B
@c   MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
@c that the directory where it is installed is the value of @code{HOME}
@c environment variable.  That is, if your Emacs binary,
@c @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
@c Emacs acts as if @code{HOME} were set to @samp{c:/utils/emacs}.  In
@c particular, that is where Emacs looks for the init file @file{_emacs}.
@c With this in mind, you can use @samp{~} in file names as an alias for
@c the home directory, as you would in Unix.  You can also set @code{HOME}
@c variable in the environment before starting Emacs; its value will then
@c override the above default behavior.
MS-DOS$B$K$O%[!<%`%G%#%l%/%H%j$H$$$&35G0$,$J$$$N$G!"(B
MS-DOS$BMQ(BEmacs$B$G$O!"(BEmacs$B$r%$%s%9%H!<%k$7$F$"$k%G%#%l%/%H%j$r(B
$B4D6-JQ?t(B@code{HOME}$B$NCM$G$"$k$H$$$&$3$H$K$7$^$9!#(B
$B$D$^$j!"(BEmacs$B$N%P%$%J%j(B@file{emacs.exe}$B$,(B
$B%G%#%l%/%H%j(B@file{c:/utils/emacs/bin}$B$KCV$$$F$"$k$H$9$l$P!"(B
Emacs$B$O!"4D6-JQ?t(B@code{HOME}$B$,(B@samp{c:/utils/emacs}$B$H(B
$B@_Dj$5$l$F$$$k$+$N$h$&$K$U$k$^$$$^$9!#(B
$BFC$K!"$3$3$,=i4|2=%U%!%$%k(B@file{_emacs}$B$rC5$9>l=j$H$J$j$^$9!#(B
$B$3$N$3$H$r?4$KN1$a$F$*$1$P!"(BUNIX$B$G$N$h$&$K!"(B
$B%[!<%`%G%#%l%/%H%j$NJLL>$H$7$F%U%!%$%kL>$K(B@samp{~}$B$r;H$($^$9!#(B
Emacs$B$r5/F0$9$k$^$($K4D6-JQ?t(B@code{HOME}$B$r@_Dj$9$k$3$H$b$G$-!"(B
$B$=$N>l9g$K$O!">e=R$N%G%U%)%k%H$N$U$k$^$$$KM%@h$7$^$9!#(B

@c   Emacs on MS-DOS handles the directory name @file{/dev} specially,
@c because of a feature in the emulator libraries of DJGPP that pretends
@c I/O devices have names in that directory.  We recommend that you avoid
@c using an actual directory named @file{/dev} on any disk.
DJGPP$B$N%(%_%e%l!<%7%g%s%i%$%V%i%j$N5!G=$G$O(B
$BF~=PNOAuCV$O%G%#%l%/%H%j(B@file{/dev}$B$KCV$+$l$F$$$k$H2>Dj$9$k$N$G!"(B
MS-DOS$BMQ(BEmacs$B$O%G%#%l%/%H%jL>(B@file{/dev}$B$rFCJL07$$$7$^$9!#(B
$B$$$+$J$k%G%#%9%/>e$G$b(B@file{/dev}$B$H$$$&%G%#%l%/%H%jL>$r;H$o$J$$$h$&$K(B
$BCi9p$7$F$*$-$^$9!#(B

@node Text and Binary
@c @section Text Files and Binary Files
@c @cindex text and binary files on MS-DOS/MS-Windows
@section $B%F%-%9%H%U%!%$%k$H%P%$%J%j%U%!%$%k(B
@cindex $B%F%-%9%H%U%!%$%k$H%P%$%J%j%U%!%$%k!J(BMS-DOS$B!K(B

@c   GNU Emacs uses newline characters to separate text lines.  This is the
@c convention used on Unix, on which GNU Emacs was developed, and on GNU
@c systems since they are modeled on Unix.
GNU Emacs$B$G$O!"%F%-%9%H9T$N6h@Z$j$H$7$F2~9TJ8;z$r;H$$$^$9!#(B
$B$3$l$O!"(BGNU Emacs$B$,3+H/$5$l$?(BUNIX$B$G$N=,47$G$"$j!"(B
UNIX$B$r%b%G%k$H$7$?(BGNU$B%7%9%F%`$G$N=,47$G$b$"$j$^$9!#(B

@c @cindex end-of-line conversion on MS-DOS/MS-Windows
@c   MS-DOS and MS-Windows normally use carriage-return linefeed, a
@c two-character sequence, to separate text lines.  (Linefeed is the same
@c character as newline.)  Therefore, convenient editing of typical files
@c with Emacs requires conversion of these end-of-line (EOL) sequences.
@c And that is what Emacs normally does: it converts carriage-return
@c linefeed into newline when reading files, and converts newline into
@c carriage-return linefeed when writing files.  The same mechanism that
@c handles conversion of international character codes does this conversion
@c also (@pxref{Coding Systems}).
@cindex $B9TKvJQ49!J(BMS-DOS/MS-Windows$B!K(B
MS-DOS$B$H(BMS-Windows$B$G$O!"%F%-%9%H9T$N6h@Z$j$H$7$F!"(B
$BDL>o!"I|5"!&9TAw$j$N(B2$BJ8;zNs$r;H$$$^$9!#(B
$B!J9TAw$j$O2~9T$HF1$8J8;z$G$9!#!K(B
$B$7$?$,$C$F!"(BEmacs $B$K$*$$$FE57?E*$J%U%!%$%k$rJXMx$KJT=8$9$k$K$O!"(B
$B$3$l$i$N9TKv!J(Bend-of-line$B!"(BEOL$B!KJ8;zNs$rJQ49$9$kI,MW$,$"$j$^$9!#(B
Emacs$B$ODL>o$D$.$N$h$&$K$7$^$9!#(B
$B%U%!%$%k$rFI$_9~$`$H$-$K$OI|5"!&9TAw$j$r2~9T$KJQ49$7!"(B
$B%U%!%$%k$r=q$-=P$9$H$-$K$O2~9T$rI|5"!&9TAw$j$KJQ49$7$^$9!#(B
$B9q:]J8;z%3!<%I$NJQ49$r07$&5!9=$G$b$3$NJQ49$r9T$$$^$9(B
$B!J(B@pxref{Coding Systems}$B!K!#(B

@c @cindex cursor location, under MS-DOS
@c @cindex point location, under MS-DOS
@cindex $B%+!<%=%k0LCV!J(BMS-DOS$B!K(B
@cindex $B%]%$%s%H0LCV!J(BMS-DOS$B!K(B
@c   One consequence of this special format-conversion of most files is
@c that character positions as reported by Emacs (@pxref{Position Info}) do
@c not agree with the file size information known to the operating system.
$B$[$H$s$I$N%U%!%$%k$K$*$1$k$3$NFCJL$J=q<0JQ49$N$?$a$K!"(B
Emacs$B$,Js9p$9$kJ8;z0LCV!J(B@pxref{Position Info}$B!K$O!"(B
$B%*%Z%l!<%F%#%s%0%7%9%F%`>e$G$N%U%!%$%k%5%$%:>pJs$H?)$$0c$$$^$9!#(B

@vindex file-name-buffer-file-type-alist
@c   Some kinds of files should not be converted, because their contents
@c are not really text.  Therefore, Emacs on MS-DOS distinguishes certain
@c files as @dfn{binary files}, and reads and writes them verbatim.  (This
@c distinction is not part of MS-DOS; it is made by Emacs only.)  These
@c include executable programs, compressed archives, etc.  Emacs uses the
@c file name to decide whether to treat a file as binary: the variable
@c @code{file-name-buffer-file-type-alist} defines the file-name patterns
@c that indicate binary files.  Note that if a file name matches one of the
@c patterns for binary files in @code{file-name-buffer-file-type-alist},
@c Emacs uses the @code{no-conversion} coding system (@pxref{Coding
@c Systems}) which turns off @emph{all} coding-system conversions, not only
@c the EOL conversion.
$BFbMF$,%F%-%9%H$G$O$J$$$"$k<o$N%U%!%$%k$O!"JQ49$9$Y$-$G$O$"$j$^$;$s!#(B
$B$7$?$,$C$F!"(BMS-DOS$BMQ(BEmacs$B$O!"(B
$B$"$k<o$N%U%!%$%k$r(B@dfn{$B%P%$%J%j%U%!%$%k(B}$B$H$7$F6hJL$7$F!"(B
$B$=$N$^$^FI$_=q$-$7$^$9!#(B
$B!J$3$N6hJL$O(BMS-DOS$B$N$b$N$G$O$J$/!"(BEmacs$B$,$b$?$i$9$b$N$G$9!#!K(B
$B$3$l$i$K$O!"<B9T%W%m%0%i%`!"05=L$7$?%"!<%+%$%V$J$I$,4^$^$l$^$9!#(B
Emacs$B$O%U%!%$%kL>$rMQ$$$F!"%P%$%J%j%U%!%$%k$H$7$F07$&$Y$-$+$I$&$+7hDj$7$^$9!#(B
$BJQ?t(B@code{file-name-buffer-file-type-alist}$B$K$O!"(B
$B%P%$%J%j%U%!%$%k$rI=$9%U%!%$%kL>$N%Q%?!<%s$rDj5A$7$F$*$-$^$9!#(B
@code{file-name-buffer-file-type-alist}$B$K;XDj$7$?%P%$%J%j%U%!%$%k$N(B
$B%Q%?!<%s$K%U%!%$%kL>$,0lCW$9$k$H!"(B
Emacs$B$O9TKvJQ49$@$1$G$J$/(B@emph{$B$9$Y$F(B}$B$NId9fJQ49$rM^@)$9$k(B
$B%3!<%G%#%s%0%7%9%F%`!J(B@pxref{Coding Systems}$B!K(B@code{no-conversion}$B$r;H$$$^$9!#(B

@c   In addition, if Emacs recognizes from a file's contents that it uses
@c newline rather than carriage-return linefeed as its line separator, it
@c does not perform conversion when reading or writing that file.  Thus,
@c you can read and edit files from Unix or GNU systems on MS-DOS with no
@c special effort, and they will be left with their Unix-style EOLs.
$B$5$i$K!"(BEmacs$B$O!"%U%!%$%k$NFbMF$+$i9T6h@Z$j$H$7$F(B
$BI|5"!&9TAw$j$G$J$/2~9T$rMQ$$$F$$$k$HH=CG$9$k$H!"(B
$B%U%!%$%k$NFI$_=q$-$K$*$$$FJQ49$r9T$$$^$;$s!#(B
$B$7$?$,$C$F!"FC$KEXNO$7$J$/$F$b!"(B
UNIX$B$d(BGNU$B%7%9%F%`$+$i$N%U%!%$%k$r(BMS-DOS$B>e$GFI$s$@$jJT=8$G$-!"(B
$B$=$l$i$N%U%!%$%k$N9TKv$O(BUNIX$BN.$N9TKv$N$^$^$G$9!#(B

@findex find-file-text
@findex find-file-binary
@c   You can visit a file and specify whether to treat a file as text or
@c binary using the commands @code{find-file-text} and
@c @code{find-file-binary}.  End-of-line conversion is part of the general
@c coding system conversion mechanism, so another way to control whether to
@c treat a file as text or binary is with the commands for specifying a
@c coding system (@pxref{Specify Coding}).  For example,
@c @kbd{C-x @key{RET} c undecided-unix @key{RET} C-x C-f foobar.txt}
@c visits the file @file{foobar.txt} without converting the EOLs.
$B%3%^%s%I(B@code{find-file-text}$B$d%3%^%s%I(B@code{find-file-binary}$B$rMQ$$$k$H!"(B
$B%U%!%$%k$r%F%-%9%H$H$7$F07$&$+(B
$B%P%$%J%j$H$7$F07$&$+$r;XDj$7$FK,$l$k$3$H$,$G$-$^$9!#(B
$B9TKvJQ49$O%3!<%G%#%s%0%7%9%F%`$N0lHLE*$JJQ495!9=$N0lIt$J$N$G!"(B
$B%3!<%G%#%s%0%7%9%F%`$r;XDj$9$k%3%^%s%I!J(B@pxref{Specify Coding}$B!K$K$h$C$F(B
$B%U%!%$%k$r%F%-%9%H$H$7$F07$&$+%P%$%J%j$H$7$F07$&$+$r;XDj$9$k$3$H$b$G$-$^$9!#(B
$B$?$H$($P!"(B@kbd{C-x @key{RET} c undecided-unix @key{RET} C-x C-f foobar.txt}
$B$H$9$l$P!"9TKvJQ49$r$;$:$K%U%!%$%k(B@file{foobar.txt}$B$rK,$l$k$3$H$,$G$-$^$9!#(B

@c   The mode line indicates whether end-of-line translation was used for
@c the current buffer.  Normally a colon appears after the coding system
@c letter near the beginning of the mode line.  If MS-DOS end-of-line
@c translation is in use for the buffer, this character changes to a
@c backslash.
$B%b!<%I9T$K$O%+%l%s%H%P%C%U%!$G9TKvJQ49$r9T$C$?$+$I$&$+I=<($5$l$^$9!#(B
$B%b!<%I9T$N;O$a$N$[$&$K$"$k%3!<%G%#%s%0%7%9%F%`$rI=$9J8;z$N$&$7$m$K$O!"(B
$BDL>o!"%3%m%s$,I=<($5$l$^$9!#(B
$B%P%C%U%!$G(BMS-DOS$B$N9TKvJQ49$r;H$C$F$$$k>l9g$K$O!"(B
$B$3$NJ8;z$O%P%C%/%9%i%C%7%e$KJQ$o$j$^$9!#(B

@c @cindex untranslated file system
@cindex $BL5JQ49$N%U%!%$%k%7%9%F%`(B
@findex add-untranslated-filesystem
@c   When you use NFS or Samba to access file systems that reside on
@c computers using Unix or GNU systems, Emacs should not perform
@c end-of-line translation on any files in these file systems--not even
@c when you create a new file.  To request this, designate these file
@c systems as @dfn{untranslated} file systems by calling the function
@c @code{add-untranslated-filesystem}.  It takes one argument: the file
@c system name, including a drive letter and optionally a directory.  For
@c example,
NFS$B$d(BSamba$B$rMQ$$$F(BUNIX$B$d(BGNU$B%7%9%F%`$r;H$C$?(B
$B%3%s%T%e!<%?>e$N%U%!%$%k%7%9%F%`$r;2>H$9$k$H$-!"(B
$B$3$l$i$N%U%!%$%k%7%9%F%`>e$N$I$N%U%!%$%k$KBP$7$F$O!"(B
$B?75,:n@.;~$G$J$/$F$b!"(BEmacs$B$O9TKvJQ49$r9T$&$Y$-$G$O$"$j$^$;$s!#(B
$B$3$&$9$k$?$a$K$O!"(B
$B3:Ev$9$k%U%!%$%k%7%9%F%`$r(B@dfn{$BL5JQ49(B}$B$N(B
$B%U%!%$%k%7%9%F%`$H;XDj$9$k$?$a$K!"(B
$B4X?t(B@code{add-untranslated-filesystem}$B$r8F$S$^$9!#(B
$B$3$N4X?t$O!"%U%!%$%k%7%9%F%`L>$G$"$k0z?t$r(B1$B$D$H$j$^$9$,!"(B
$B$3$l$K$O%I%i%$%VL>$d%G%#%l%/%H%jL>$r4^$a$k$3$H$b$G$-$^$9!#(B
$B$?$H$($P!"(B

@example
(add-untranslated-filesystem "Z:")
@end example

@noindent
@c designates drive Z as an untranslated file system, and
$B$O!"%I%i%$%V(BZ$B$rL5JQ49$N%U%!%$%k%7%9%F%`$H$7$F;XDj$7$^$9$7!"(B

@example
(add-untranslated-filesystem "Z:\\foo")
@end example

@noindent
@c designates directory @file{\foo} on drive Z as an untranslated file
@c system.
$B$O!"%I%i%$%V(BZ$B>e$N%G%#%l%/%H%j(B@file{\foo}$B$r(B
$BL5JQ49$N%U%!%$%k%7%9%F%`$H$7$F;XDj$7$^$9!#(B

@c   Most often you would use @code{add-untranslated-filesystem} in your
@c @file{_emacs} file, or in @file{site-start.el} so that all the users at
@c your site get the benefit of it.
$B8D?M$N(B@file{_emacs}$B%U%!%$%k$d(B
$B%5%$%H$NA4%f!<%6!<$KJXMx$J$h$&$K(B@file{site-start.el}$B$NCf$G!"(B
@code{add-untranslated-filesystem}$B$r;H$&$3$H$,B?$$$G$7$g$&!#(B

@findex remove-untranslated-filesystem
@c   To countermand the effect of @code{add-untranslated-filesystem}, use
@c the function @code{remove-untranslated-filesystem}.  This function takes
@c one argument, which should be a string just like the one that was used
@c previously with @code{add-untranslated-filesystem}.
@code{add-untranslated-filesystem}$B$N8z2L$r<h$j>C$9$K$O!"(B
$B4X?t(B@code{remote-untranslated-filesystem}$B$r;H$$$^$9!#(B
$B$3$N4X?t$O!"$^$($K(B@code{add-untranslated-filesystem}$B$K;H$C$?$N$H(B
$BF1$8J8;zNs$r0z?t$H$7$F$H$j$^$9!#(B

@node MS-DOS Printing
@c @section Printing and MS-DOS
@section $B0u:~$H(BMS-DOS

@c   Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
@c @code{ps-print-buffer} (@pxref{Postscript}) can work in MS-DOS and
@c MS-Windows by sending the output to one of the printer ports, if a
@c Unix-style @code{lpr} program is unavailable.  This behaviour is
@c controlled by the same variables that control printing with @code{lpr}
@c on Unix (@pxref{Hardcopy}, @pxref{Postscript Variables}), but the
@c defaults for these variables on MS-DOS and MS-Windows are not the same
@c as the defaults on Unix.
@code{lpr-buffer}$B!J(B@pxref{Hardcopy}$B!K$d(B
@code{ps-print-buffer}$B!J(B@pxref{Postscript}$B!K$N$h$&$J0u:~%3%^%s%I$O!"(B
UNIX$BN.$N%W%m%0%i%`(B@code{lpr}$B$,$J$$>l9g$K$O!"(B
$B%W%j%s%?%]!<%H$KD>@\=PNO$rAw$l$P(BMS-DOS$B$d(BMS-Windows$B$G$bF0:n$7$^$9!#(B
$B$3$N$U$k$^$$$O!"(BUNIX$B>e$N(B@code{lpr}$B$G$N0u:~(B
$B!J(B@pxref{Hardcopy}$B!"(B@pxref{Postscript Variables}$B!K(B
$B$r@)8f$9$kJQ?t$HF1$8JQ?t$G@)8f$5$l$^$9$,!"(B
MS-DOS$B$d(BMS-Windows$B>e$G$N$3$l$i$NJQ?t$N%G%U%)%k%HCM$O!"(B
UNIX$B>e$G$NCM$HF1$8$G$O$"$j$^$;$s!#(B

@c @vindex printer-name @r{(MS-DOS)}
@vindex printer-name @r{$B!J(BMS-DOS$B!K(B}
@c   If you want to use your local printer, printing on it in the usual DOS
@c manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
@c default value) and @code{printer-name} to the name of the printer
@c port---for example, @code{"PRN"}, the usual local printer port (that's
@c the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer.
@c You can also set @code{printer-name} to a file name, in which case
@c ``printed'' output is actually appended to that file.  If you set
@c @code{printer-name} to @code{"NUL"}, printed output is silently
@c discarded (sent to the system null device).
DOS$BN.$NDL>o$N0u:~$N$h$&$K!"%m!<%+%k$N%W%j%s%?$r;H$$$?$$>l9g$K$O!"(B
Lisp$BJQ?t(B@code{lpr-command}$B$K(B@code{""}$B!J%G%U%)%k%HCM!K$r@_Dj$7!"(B
@code{printer-name}$B$K$O%W%j%s%?%]!<%H$NL>A0$r@_Dj$7$^$9!#(B
$B$?$H$($P!"%m!<%+%k$N%W%j%s%?%]!<%H$J$i$P!J%G%U%)%k%HCM$N!K(B@code{"PRN"}$B$d(B
@code{"LPT2"}$B!"%7%j%"%k%W%j%s%?$J$i$P(B@code{"COM1"}$B$G$9!#(B
@code{printer-name}$B$K$O%U%!%$%kL>$b@_Dj$G$-$^$9!#(B
$B$=$N>l9g$K$O!"!X0u:~!Y7k2L$O!"$=$N%U%!%$%k$KDI2C=q$-$5$l$^$9!#(B
@code{printer-name}$B$K(B@code{"NUL"}$B$r@_Dj$9$k$H!"(B
$B0u:~7k2L$O!J%7%9%F%`$N6u%G%P%$%9$KAw$i$l$F!KL[$C$F<N$F$i$l$^$9!#(B

@c   On MS-Windows, when the Windows network software is installed, you can
@c also use a printer shared by another machine by setting
@c @code{printer-name} to the UNC share name for that printer--for example,
@c @code{"//joes_pc/hp4si"}.  (It doesn't matter whether you use forward
@c slashes or backslashes here.)  To find out the names of shared printers,
@c run the command @samp{net view} at a DOS command prompt to obtain a list
@c of servers, and @samp{net view @var{server-name}} to see the names of printers
@c (and directories) shared by that server.
MS-Windows$B$G$O!"(BWindows$B$N%M%C%H%o!<%/%=%U%H%&%'%"$r%$%s%9%H!<%k$7$F$"$l$P!"(B
@code{printer-name}$B$K!"B>$N%^%7%s$H$N6&MQ%W%j%s%?$N(BUNC$B6&MQL>(B
$B!J$?$H$($P(B@code{"//joes_pc/hp4si"}$B!K$r@_Dj$9$l$P!"(B
$B$=$N%W%j%s%?$rMxMQ$9$k$3$H$b$G$-$^$9!#(B
$B!J%9%i%C%7%e$G$b%P%C%/%9%i%C%7%e$G$b$+$^$$$^$;$s!#!K(B
$B6&MQ%W%j%s%?$NL>A0$rD4$Y$k$K$O!"(B
DOS$B%3%^%s%I%W%m%s%W%H$G(B@samp{net view}$B$r<B9T$7$F%5!<%P!<0lMw$r<hF@$7$F$+$i!"(B
@samp{net view @var{server-name}}$B$r<B9T$7$F(B
$B%5!<%P!<$,6&M-$9$k%W%j%s%?!J$H%G%#%l%/%H%j!K$NL>A0$rD4$Y$^$9!#(B

@c   If you set @code{printer-name} to a file name, it's best to use an
@c absolute file name.  Emacs changes the working directory according to
@c the default directory of the current buffer, so if the file name in
@c @code{printer-name} is relative, you will end up with several such
@c files, each one in the directory of the buffer from which the printing
@c was done.
@code{printer-name}$B$K%U%!%$%kL>$r@_Dj$9$k$H$-$K$O!"(B
$B@dBP%U%!%$%kL>$r;H$&$N$,:GNI$G$9!#(B
Emacs$B$O!"%+%l%s%H%P%C%U%!$N%G%U%)%k%H%G%#%l%/%H%j$K1~$8$F(B
$B:n6H%G%#%l%/%H%j$rJQ99$7$^$9!#(B
@code{printer-name}$B$N%U%!%$%kL>$,AjBPE*$G$"$k$H!"(B
$B0u:~$r9T$C$?%P%C%U%!$N%G%#%l%/%H%j$4$H$K!"(B
$B$=$N$h$&$JL>A0$N%U%!%$%k$,$G$-$F$7$^$$$^$9!#(B

@c @findex print-buffer @r{(MS-DOS)}
@c @findex print-region @r{(MS-DOS)}
@c @vindex lpr-headers-switches @r{(MS-DOS)}
@findex print-buffer @r{$B!J(BMS-DOS$B!K(B}
@findex print-region @r{$B!J(BMS-DOS$B!K(B}
@vindex lpr-headers-switches @r{$B!J(BMS-DOS$B!K(B}
@c   The commands @code{print-buffer} and @code{print-region} call the
@c @code{pr} program, or use special switches to the @code{lpr} program, to
@c produce headers on each printed page.  MS-DOS and MS-Windows don't
@c normally have these programs, so by default, the variable
@c @code{lpr-headers-switches} is set so that the requests to print page
@c headers are silently ignored.  Thus, @code{print-buffer} and
@c @code{print-region} produce the same output as @code{lpr-buffer} and
@c @code{lpr-region}, respectively.  If you do have a suitable @code{pr}
@c program (for example, from GNU Textutils), set
@c @code{lpr-headers-switches} to @code{nil}; Emacs will then call
@c @code{pr} to produce the page headers, and print the resulting output as
@c specified by @code{printer-name}.
$B%3%^%s%I(B@code{print-buffer}$B$d(B@code{print-region}$B$O!"(B
$B3F0u:~%Z!<%8$K8+=P$7$rIU$1$k$?$a$K!"(B
@code{pr}$B%W%m%0%i%`$r8F$S=P$7$?$j!"(B
@code{lpr}$B%W%m%0%i%`$KBP$7$FFCJL$J%U%i%0$r;H$$$^$9!#(B
MS-DOS$B$d(BMS-Windows$B$K$O!"DL>o!"$3$l$i$N%3%^%s%I$O$"$j$^$;$s$+$i!"(B
$B%G%U%)%k%H$G$O!"JQ?t(B@code{lpr-headers-switches}$B$O!"(B
$B%Z!<%88+=P$7$rIU$1$kMW5a$rL5;k$9$k$h$&$K@_Dj$7$F$"$j$^$9!#(B
$B$7$?$,$C$F!"(B@code{print-buffer}$B$d(B@code{print-region}$B$O!"(B
$B$=$l$>$l!"(B@code{lpr-buffer}$B$d(B@code{lpr-region}$B$HF1$8=PNO$K$J$j$^$9!#(B
$B!J$?$H$($P(BGNU Textutils$B$J$I$N!KE,Ev$J(B@code{pr}$B%W%m%0%i%`$,$"$k$J$i$P!"(B
@code{lpr-headers-switches}$B$K(B@code{nil}$B$r@_Dj$7$^$9!#(B
$B$9$k$H!"(BEmacs$B$O%Z!<%88+=P$7$rIU$1$k$?$a$K(B@code{pr}$B$r8F$S=P$7!"(B
@code{printer-name}$B$N;XDj$K=>$C$F=PNO7k2L$r0u:~$7$^$9!#(B

@c @vindex print-region-function @r{(MS-DOS)}
@vindex print-region-function @r{$B!J(BMS-DOS$B!K(B}
@c @cindex lpr usage under MS-DOS
@c @vindex lpr-command @r{(MS-DOS)}
@c @vindex lpr-switches @r{(MS-DOS)}
@cindex MS-DOS$B$K$*$1$k(Blpr$B$N;H$$J}(B
@vindex lpr-command @r{$B!J(BMS-DOS$B!K(B}
@vindex lpr-switches @r{$B!J(BMS-DOS$B!K(B}
@c   Finally, if you do have an @code{lpr} work-alike, you can set the
@c variable @code{lpr-command} to @code{"lpr"}.  Then Emacs will use
@c @code{lpr} for printing, as on other systems.  (If the name of the
@c program isn't @code{lpr}, set @code{lpr-command} to specify where to
@c find it.)  The variable @code{lpr-switches} has its standard meaning
@c when @code{lpr-command} is not @code{""}.  If the variable
@c @code{printer-name} has a string value, it is used as the value for the
@c @code{-P} option to @code{lpr}, as on Unix.
@code{lpr}$B$HF1$8F0:n$r$9$k(B@code{lpr}$B$,$"$k>l9g$K$O!"(B
$BJQ?t(B@code{lpr-command}$B$K(B@code{"lpr"}$B$H@_Dj$G$-$^$9!#(B
$B$9$k$H!"B>$N%7%9%F%`$HF1MM$K!"(BEmacs$B$O(B@code{lpr}$B$r;H$C$F0u:~$7$^$9!#(B
$B!J%W%m%0%i%`L>$,(B@code{lpr}$B$G$J$$>l9g$K$O!"(B
@code{lpr-command}$B$K$O%W%m%0%i%`$rC5$9>l=j$r@_Dj$9$k!#!K(B
@code{lpr-command}$B$,(B@code{""}$B0J30$N>l9g$K$O!"(B
$BJQ?t(B@code{lpr-switches}$B$K$OI8=`E*$J0UL#$,$"$j$^$9!#(B
$BJQ?t(B@code{printer-name}$B$NCM$,J8;zNs$G$"$k>l9g$K$O!"(B
UNIX$B$N>l9g$HF1MM$K!"(B@code{lpr}$B$N%*%W%7%g%s(B@code{-P}$B$NCM$H$7$F;H$o$l$^$9!#(B

@c @findex ps-print-buffer @r{(MS-DOS)}
@c @findex ps-spool-buffer @r{(MS-DOS)}
@c @vindex ps-printer-name @r{(MS-DOS)}
@c @vindex ps-lpr-command @r{(MS-DOS)}
@c @vindex ps-lpr-switches @r{(MS-DOS)}
@findex ps-print-buffer @r{$B!J(BMS-DOS$B!K(B}
@findex ps-spool-buffer @r{$B!J(BMS-DOS$B!K(B}
@vindex ps-printer-name @r{$B!J(BMS-DOS$B!K(B}
@vindex ps-lpr-command @r{$B!J(BMS-DOS$B!K(B}
@vindex ps-lpr-switches @r{$B!J(BMS-DOS$B!K(B}
@c   A parallel set of variables, @code{ps-lpr-command},
@c @code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{Postscript
@c Variables}), defines how PostScript files should be printed.  These
@c variables are used in the same way as the corresponding variables
@c described above for non-PostScript printing.  Thus, the value of
@c @code{ps-printer-name} is used as the name of the device (or file) to
@c which PostScript output is sent, just as @code{printer-name} is used for
@c non-PostScript printing.  (There are two distinct sets of variables in
@c case you have two printers attached to two different ports, and only one
@c of them is a PostScript printer.)
$BF1MM$N0lO"$NJQ?t!"(B@code{ps-lpr-command}$B!"(B@code{ps-lpr-switches}$B!"(B
@code{ps-printer-name}$B!J(B@pxref{Postscript Variables}$B!K$O!"(B
PostScript$B%U%!%$%k$N0u:~J}K!$rDj5A$7$^$9!#(B
$B$3$l$i$NJQ?t$O!">e$K=R$Y$?Hs(BPostScript$B0u:~MQ$NBP1~$9$kJQ?t$H(B
$BF1$8$h$&$K;H$o$l$^$9!#(B
$B$D$^$j!"(B@code{ps-printer-name}$B$NCM$O!"(B
$BHs(BPostScript$B0u:~$G$N(B@code{printer-name}$B$N;H$$J}$HF1MM$K!"(B
PostScript$B=PNO$NAw$j@h$NAuCV!J$d%U%!%$%k!K$NL>A0$H$7$F;H$o$l$^$9!#(B
$B!J$D$^$j!"JL!9$N(B2$B$D$N%]!<%H$K(B2$BBf$N%W%j%s%?$r@\B3$7$F$"$j!"(B
$B$=$N0lJ}$,(BPostScript$B%W%j%s%?$N>l9g!"0[$J$k(B2$BAH$NJQ?t72$r;H$($k!#!K(B

@c   The default value of the variable @code{ps-lpr-command} is @code{""},
@c which causes PostScript output to be sent to the printer port specified
@c by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
@c the name of a program which will accept PostScript files.  Thus, if you
@c have a non-PostScript printer, you can set this variable to the name of
@c a PostScript interpreter program (such as Ghostscript).  Any switches
@c that need to be passed to the interpreter program are specified using
@c @code{ps-lpr-switches}.  (If the value of @code{ps-printer-name} is a
@c string, it will be added to the list of switches as the value for the
@c @code{-P} option.  This is probably only useful if you are using
@c @code{lpr}, so when using an interpreter typically you would set
@c @code{ps-printer-name} to something other than a string so it is
@c ignored.)
$BJQ?t(B@code{ps-lpr-command}$B$N%G%U%)%k%HCM$O(B@code{""}$B$G$"$j!"(B
PostScript$B=PNO$r(B@code{ps-printer-name}$B$G;XDj$9$k%W%j%s%?%]!<%H$X(B
$BAw$k$3$H$r0UL#$7$^$9!#(B
$B$7$+$7!"(B@code{ps-lpr-command}$B$K$O!"(BPostScript$B%U%!%$%k$r<uM}$9$k(B
$B%W%m%0%i%`$NL>A0$r@_Dj$7$F$b$+$^$$$^$;$s!#(B
$B$D$^$j!"Hs(BPostScript$B%W%j%s%?$,$"$k>l9g!"(B
$B$3$NJQ?t$K!J(BGhostscript$B$J$I$N!K(BPostScript$B%$%s%?!<%W%j%?%W%m%0%i%`$N(B
$BL>A0$r@_Dj$G$-$^$9!#(B
$B%$%s%?!<%W%j%?%W%m%0%i%`$KEO$9I,MW$,$"$k%*%W%7%g%s$O!"(B
@code{ps-lpr-switches}$B$rMQ$$$F;XDj$7$^$9!#(B
$B!J(B@code{ps-printer-name}$B$NCM$,J8;zNs$N>l9g!"$=$NCM$O!"(B
$B%*%W%7%g%s(B@code{-P}$B$NCM$H$7$F!"%*%W%7%g%sNs$KIU2C$5$l$k!#(B
$B$3$l$O!"(B@code{lpr}$B$r;H$&>l9g$K$@$1M-MQ$G$"$m$&!#(B
$B$H$$$&$N$O!"%$%s%?!<%W%j%?$r;H$&>l9g!"E57?E*$K$O!"(B
@code{ps-printer-name}$B$K$OJ8;zNs0J30$r@_Dj$7$FL5;k$5$;$k!#!K(B

@c   For example, to use Ghostscript for printing on an Epson printer
@c connected to the @samp{LPT2} port, put this in your @file{_emacs} file:
$B$?$H$($P!"%]!<%H(B@samp{LPT2}$B$K@\B3$7$?(BEpson$B%W%j%s%?$K0u:~$9$k$?$a$K(B
Ghostscript$B$r;H$&$K$O!"$D$.$NFbMF$r8D?M$N%U%!%$%k(B@file{_emacs}$B$KF~$l$^$9!#(B

@example
@c (setq ps-printer-name t)  ; Ghostscript doesn't understand -P
(setq ps-printer-name t)  ; Ghostscript$B$O(B -P $B$rM}2r$7$J$$(B
(setq ps-lpr-command "c:/gs/gs386")
(setq ps-lpr-switches '("-q" "-dNOPAUSE"
			"-sDEVICE=epson"
			"-r240x72"
			"-sOutputFile=LPT2"
			"-Ic:/gs"))
@end example

@noindent
@c (This assumes that Ghostscript is installed in the @file{"c:/gs"}
@c directory.)
$B!J$3$NNc$G$O!"(B
$B%G%#%l%/%H%j(B@file{"c:/gs"}$B$K(BGhostscript$B$r%$%s%9%H!<%k$7$F$"$k$H2>Dj!#!K(B

@vindex dos-printer
@vindex dos-ps-printer
@c   For backwards compatibility, the value of @code{dos-printer}
@c (@code{dos-ps-printer}), if it has a value, overrides the value of
@c @code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
@c only.
MS-DOS$B$H(BMS-Windows$B$G$O!"8eJ}8_49$N$?$a$K!"(B
@code{dos-printer}$B!J$d(B@code{dos-ps-printer}$B!K$NCM$r@_Dj$7$F$"$k$H!"(B
@code{printer-name}$B!J$d(B@code{ps-printer-name}$B!K$NCM$r>e=q$-$7$^$9!#(B


@node MS-DOS and MULE
@c @section International Support on MS-DOS
@c @cindex international support @r{(MS-DOS)}
@section MS-DOS$B$G$N9q:]2=BP1~(B
@cindex $B9q:]2=BP1~(B@r{$B!J(BMS-DOS$B!K(B}

@c   Emacs on MS-DOS supports the same international character sets as it
@c does on Unix and other platforms (@pxref{International}), including
@c coding systems for converting between the different character sets.
@c However, due to incompatibilities between MS-DOS/MS-Windows and Unix,
@c there are several DOS-specific aspects of this support that users should
@c be aware of.  This section describes these aspects.
MS-DOS$B>e$N(BEmacs$B$O!"(BUNIX$B$dB>$N%W%i%C%H%U%)!<%`>e$HF1$8(B
$B9q:]2=J8;z=89g$r07$($^$9!J(B@pxref{International}$B!K!#(B
$B$3$l$K$O!"0[$J$kJ8;z=89g$N$"$$$@$NJQ49$r9T$&%3!<%G%#%s%0%7%9%F%`$b4^$_$^$9!#(B
$B$7$+$7$J$,$i!"(BMS-DOS/MS-Windows$B$H(BUNIX$B$H$NHs8_49@-$K5/0x$9$k(B
DOS$B$K8GM-$JFC?'$,$"$j!"%f!<%6!<$OM}2r$7$F$*$/I,MW$,$"$j$^$9!#(B
$BK\@a$G$O!"$3$l$i$NFC?'$K$D$$$F=R$Y$^$9!#(B

@table @kbd
@item M-x dos-codepage-setup
@c Set up Emacs display and coding systems as appropriate for the current
@c DOS codepage.
Emacs$B2hLL$H%3!<%G%#%s%0%7%9%F%`$r(B
$B%+%l%s%H(BDOS$B%3!<%I%Z!<%8$KE,$7$?$b$N$K@_Dj$9$k!#(B

@item M-x codepage-setup
@c Create a coding system for a certain DOS codepage.
$BFCDj$N(BDOS$B%3!<%I%Z!<%8MQ$N%3!<%G%#%s%0%7%9%F%`$r:n@.$9$k!#(B
@end table

@c @cindex codepage, MS-DOS
@c @cindex DOS codepages
@cindex $B%3!<%I%Z!<%8!"(BMS-DOS
@cindex DOS$B%3!<%I%Z!<%8(B
@c   MS-DOS is designed to support one character set of 256 characters at
@c any given time, but gives you a variety of character sets to choose
@c from.  The alternative character sets are known as @dfn{DOS codepages}.
@c Each codepage includes all 128 ASCII characters, but the other 128
@c characters (codes 128 through 255) vary from one codepage to another.
@c Each DOS codepage is identified by a 3-digit number, such as 850, 862,
@c etc.
MS-DOS$B$O!"0lEY$K$O(B256$BJ8;z$+$i@.$kC10l$NJ8;z=89g$r07$($k$h$&$K(B
$B@_7W$5$l$F$$$^$9$,!"$5$^$6$^$JJ8;z=89g$+$iA*Br$G$-$^$9!#(B
$BBeBXJ8;z=89g$O!"(B@dfn{DOS$B%3!<%I%Z!<%8(B}$B$H8F$P$l$^$9!#(B
$B3F%3!<%I%Z!<%8$O!"(B128$B8D$NA4(BASCII$BJ8;z$r4^$_$^$9$,!"(B
$B;D$j$N(B128$BJ8;z!J%3!<%I(B128$B!A(B255$B!K$O!"%3!<%I%Z!<%8$4$H$K0[$J$j$^$9!#(B
$B3F(BDOS$B%3!<%I%Z!<%8$O!"(B850$B$d(B862$B$J$I$N(B3$B7e$N?t;z$G<1JL$7$^$9!#(B

@c   In contrast to X Windows, which lets you use several fonts at the same
@c time, MS-DOS doesn't allow use of several codepages in a single session.
@c Instead, MS-DOS loads a single codepage at system startup, and you must
@c reboot MS-DOS to change it@footnote{Normally, one particular codepage is
@c burnt into the display memory, while other codepages can be installed by
@c modifying system configuration files, such as @file{CONFIG.SYS}, and
@c rebooting.}.  Much the same limitation applies when you run DOS
@c executables on other systems such as MS-Windows.
$BF1;~$KJ#?t$N%U%)%s%H$r;H$($k(BX$B%&%#%s%I%&$KHf$Y$k$H!"(B
MS-DOS$B$G$O(B1$B$D$N%;%C%7%g%s$G$OJ#?t$N%3!<%I%Z!<%8$r;H$($^$;$s!#(B
MS-DOS$B$O%7%9%F%`%V!<%H;~$KC10l$N%3!<%I%Z!<%8$r%m!<%I$7$^$9!#(B
$B%3!<%I%Z!<%8$rJQ99$9$k$K$O(BMS-DOS$B$r%j%V!<%H$9$kI,MW$,$"$j$^$9(B
@footnote{$BDL>o!"(B1$B$D$NFCDj$N%3!<%I%Z!<%8$O%G%#%9%W%l%$%a%b%j$KAH$_9~$s$G$"$j!"(B
$BB>$N%3!<%I%Z!<%8$O!"(B@file{CONFIG.SYS}$B$J$I$N(B
$B%7%9%F%`@_Dj%U%!%$%k$rJQ99$7$F%j%V!<%H$9$k$H%$%s%9%H!<%k$G$-$k!#(B}$B!#(B
MS-Windows$B$J$I$NB>$N%7%9%F%`$G(BDOS$B%W%m%0%i%`$r<B9T$9$k>l9g$K$b!"(B
$BF1MM$N@)Ls$,2]$;$i$l$^$9!#(B

@c @cindex unibyte operation @r{(MS-DOS)}
@cindex unibyte operation @r{$B!J(BMS-DOS$B!K(B}
@c   If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
@c (@pxref{Initial Options}), Emacs does not perform any conversion of
@c non-ASCII characters.  Instead, it reads and writes any non-ASCII
@c characters verbatim, and sends their 8-bit codes to the display
@c verbatim.  Thus, unibyte Emacs on MS-DOS supports the current codepage,
@c whatever it may be, but cannot even represent any other characters.
MS-DOS$B>e$G%*%W%7%g%s(B@samp{--unibyte}
$B!J(B@pxref{Initial Options}$B!K$r;XDj$7$F(BEmacs$B$r5/F0$9$k$H!"(B
Emacs$B$O!"$$$+$J$kJQ49$bHs(BASCII$BJ8;z$K$O9T$$$^$;$s!#(B
$BHs(BASCII$BJ8;z$O$=$N$^$^FI$_=q$-$7!"(B
$B2hLL$K$O(B8$B%S%C%H%3!<%I$r$=$N$^$^Aw$j$^$9!#(B
$B$D$^$j!"(BMS-DOS$B>e$N%f%K%P%$%H(BEmacs$B$O!"(B
$B$J$s$G$"$l%+%l%s%H%3!<%I%Z!<%8$r;H$$$^$9$,!"(B
$B$=$l0J30$NJ8;z$rI=8=$9$k$3$H$O$G$-$^$;$s!#(B

@vindex dos-codepage
@c   For multibyte operation on MS-DOS, Emacs needs to know which
@c characters the chosen DOS codepage can display.  So it queries the
@c system shortly after startup to get the chosen codepage number, and
@c stores the number in the variable @code{dos-codepage}.  Some systems
@c return the default value 437 for the current codepage, even though the
@c actual codepage is different.  (This typically happens when you use the
@c codepage built into the display hardware.)  You can specify a different
@c codepage for Emacs to use by setting the variable @code{dos-codepage} in
@c your init file.
MS-DOS$B>e$G$N%^%k%A%P%$%HA`:n$K$O!"(B
Emacs$B$O!"A*Br$5$l$F$$$k(BDOS$B%3!<%I%Z!<%8$GI=<($G$-$kJ8;z72$r(B
$BCN$C$F$*$/I,MW$,$"$j$^$9!#(B
$B$=$N$?$a!"5/F08e!"A*Br$7$F$$$k%3!<%I%Z!<%8HV9f$r%7%9%F%`$KLd$$9g$o$;!"(B
$BJQ?t(B@code{dos-codepage}$B$K$=$NHV9f$rJ]B8$7$^$9!#(B
$B<B:]$K;H$C$F$$$k%3!<%I%Z!<%8$H$O0[$J$C$F$$$F$b!"(B
$B%+%l%s%H%3!<%I%Z!<%8$N%G%U%)%k%HCM(B437$B$rJV$9%7%9%F%`$b$"$j$^$9!#(B
$B!JE57?E*$K$O!"%G%#%9%W%l%$AuCV$KAH$_9~$^$l$?%3!<%I%Z!<%8$r;HMQ$9$k$H(B
$BH/@8$9$k!#!K(B
$B8D?M$N=i4|2=%U%!%$%k$GJQ?t(B@code{dos-codepage}$B$r@_Dj$9$l$P!"(B
Emacs$B$,;H$&%3!<%I%Z!<%8!JHV9f!K$rJL$N$b$N$K;XDj$G$-$k!#(B

@c @cindex language environment, automatic selection on @r{MS-DOS}
@cindex $B8@8l4D6-!"(B@r{MS-DOS}$B$G$N<+F0A*Br(B
@c   Multibyte Emacs supports only certain DOS codepages: those which can
@c display Far-Eastern scripts, like the Japanese codepage 932, and those
@c that encode a single ISO 8859 character set.
$B%^%k%A%P%$%H(BEmacs$B$O!"FCDj$N(BDOS$B%3!<%I%Z!<%8$@$1$r07$($^$9!#(B
$B$3$l$i$K$O!"F|K\8lMQ%3!<%I%Z!<%8(B932$B$N$h$&$J6KEl$NJ8;z$rI=<($G$-$b$N$d!"(B
$BC10l$N(BISO 8859$BJ8;z=89g$rId9f2=$G$-$k$b$N$,4^$^$l$^$9!#(B

@c   The Far-Eastern codepages can directly display one of the MULE
@c character sets for these countries, so Emacs simply sets up to use the
@c appropriate terminal coding system that is supported by the codepage.
@c The special features described in the rest of this section mostly
@c pertain to codepages that encode ISO 8859 character sets.
$B6KElMQ%3!<%I%Z!<%8$O!"(B
$B$=$l$i$N9q!9MQ$N(BMULE$BJ8;z=89g$N(B1$B$D$rD>@\I=<($G$-$^$9$+$i!"(B
Emacs$B$O!"%3!<%I%Z!<%8$G07$($k(B
$BE,@Z$JC<Kv%3!<%G%#%s%0%7%9%F%`$r@_Dj$9$k$@$1$G$9!#(B
$BK\@a$N;D$j$G=R$Y$kFCJL$J5!G=$O!"(B
ISO 8859$BJ8;z=89g$rId9f2=$9$k%3!<%I%Z!<%8$K4X$9$k$3$H$G$9!#(B

@c   For the codepages which correspond to one of the ISO character sets,
@c Emacs knows the character set name based on the codepage number.  Emacs
@c automatically creates a coding system to support reading and writing
@c files that use the current codepage, and uses this coding system by
@c default.  The name of this coding system is @code{cp@var{nnn}}, where
@c @var{nnn} is the codepage number.@footnote{The standard Emacs coding
@c systems for ISO 8859 are not quite right for the purpose, because
@c typically the DOS codepage does not match the standard ISO character
@c codes.  For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
@c code 231 in the standard Latin-1 character set, but the corresponding
@c DOS codepage 850 uses code 135 for this glyph.}
ISO$BJ8;z=89g$N(B1$B$D$KBP1~$7$?%3!<%I%Z!<%8$KBP$7$F$O!"(B
Emacs$B$O%3!<%I%Z!<%8HV9f$K4p$E$$$?J8;z=89gL>$rCN$C$F$$$^$9!#(B
Emacs$B$O!"%+%l%s%H%3!<%I%Z!<%8$rMQ$$$?%U%!%$%k$NFI$_=q$-$r07$&(B
$B%3!<%G%#%s%0%7%9%F%`$r<+F0E*$K:n@.$7!"(B
$B%G%U%)%k%H$G$3$N%3!<%G%#%s%0%7%9%F%`$r;H$$$^$9!#(B
$B%3!<%I%Z!<%8HV9f$r(B@var{nnn}$B$H$9$k$H!"$3$N$h$&$J%3!<%G%#%s%0%7%9%F%`$N(B
$BL>A0$O(B@code{cp@var{nnn}}$B$G$9!#(B
@footnote{ISO 8859$BMQ$N(BEmacs$B$NI8=`%3!<%G%#%s%0%7%9%F%`$O!"(B
$B$3$NL\E*$K$O@5$7$/$J$$!#(B
$B$H$$$&$N$O!"E57?E*$J(BDOS$B%3!<%I%Z!<%8$O!"I8=`$N(BISO$BJ8;z=89g$K0lCW$7$J$$!#(B
$B$?$H$($P!"J8;z(B@samp{@,{c}}$B!J%;%G%#!<%fIU$-$N(B@samp{c}$B!K$O!"(B
$BI8=`$N(BLatin-1$BJ8;z=89g$G$O%3!<%I(B231$B$G$"$k$,!"(B
$BBP1~$9$k(BDOS$B%3!<%I%Z!<%8(B850$B$G$O$3$NJ8;z$O%3!<%I(B135$B$G$"$k!#(B}

@c @cindex mode line @r{(MS-DOS)}
@cindex $B%b!<%I9T(B@r{$B!J(BMS-DOS$B!K(B}
@c   All the @code{cp@var{nnn}} coding systems use the letter @samp{D} (for
@c ``DOS'') as their mode-line mnemonic.  Since both the terminal coding
@c system and the default coding system for file I/O are set to the proper
@c @code{cp@var{nnn}} coding system at startup, it is normal for the mode
@c line on MS-DOS to begin with @samp{-DD\-}.  @xref{Mode Line}.
@c Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding
@c systems, and thus their initial mode line looks like on Unix.
$B$9$Y$F$N(B@code{cp@var{nnn}}$B%3!<%G%#%s%0%7%9%F%`$O!"(B
$B%b!<%I9T$NI=<($K!J!X(BDOS$B!Y$N!KJ8;z(B@samp{D}$B$r;H$$$^$9!#(B
$BC<Kv%3!<%G%#%s%0%7%9%F%`$H%U%!%$%kF~=PNOMQ$N%G%U%)%k%H$N(B
$B%3!<%G%#%s%0%7%9%F%`$O!"5/F0;~$K!"(B
$B@5$7$/(B@code{cp@var{nnn}}$B%3!<%G%#%s%0%7%9%F%`$K@_Dj$5$l$^$9$+$i!"(B
MS-DOS$B$G$O!"%b!<%I9T$OIaDL(B@samp{-DD\-}$B$G;O$^$j$^$9!#(B
@xref{Mode Line}$B!#(B
$B6KElMQ(BDOS$BC<Kv$O!"(B@code{cp@var{nnn}}$B%3!<%G%#%s%0%7%9%F%`$r;HMQ$;$:!"(B
$B$=$N$?$a!"=i4|$N%b!<%I9T$O(BUNIX$B$N$h$&$K$J$j$^$9!#(B

@c   Since the codepage number also indicates which script you are using,
@c Emacs automatically runs @code{set-language-environment} to select the
@c language environment for that script (@pxref{Language Environments}).
$B%3!<%I%Z!<%8HV9f$O!";HMQ$9$kJ8;z72$r;XDj$7$^$9$+$i!"(B
Emacs$B$O!"$=$NJ8;z72MQ$N8@8l4D6-$rA*Br$9$k$?$a$K(B
@code{set-language-environment}$B$r<+F0E*$K<B9T$7$^$9(B
$B!J(B@pxref{Language Environments}$B!K!#(B

@c   If a buffer contains a character belonging to some other ISO 8859
@c character set, not the one that the chosen DOS codepage supports, Emacs
@c displays it using a sequence of ASCII characters.  For example, if the
@c current codepage doesn't have a glyph for the letter @samp{@`o} (small
@c @samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
@c the braces serve as a visual indication that this is a single character.
@c (This may look awkward for some non-Latin characters, such as those from
@c Greek or Hebrew alphabets, but it is still readable by a person who
@c knows the language.)  Even though the character may occupy several
@c columns on the screen, it is really still just a single character, and
@c all Emacs commands treat it as one.
$B%P%C%U%!Fb$K0[$J$k(BISO 8859$BJ8;z=89g$KB0$9$kJ8;z!"(B
$B$9$J$o$A!"A*Br$7$F$$$k(BDOS$B%3!<%I%Z!<%8$G07$($J$$J8;z$,4^$^$l$k>l9g!"(B
Emacs$B$O$=$NJ8;z$r(BASCII$BJ8;z$NNs$GI=<($7$^$9!#(B
$B$?$H$($P!"%+%l%s%H%3!<%I%Z!<%8$KJ8;z(B@samp{@`o}
$B!J%"%/%5%s%0%l!<%VIU$-$N>.J8;z$N(B@samp{o}$B!K$N;z7A$,$J$$$H$-$K$O!"(B
$BCf3g8L$G0O$C$F(B1$BJ8;z$G$"$k$3$H$rI=$7$F!"(B
@samp{@{`o@}}$B$HI=<($7$^$9!#(B
$B!J$3$N$h$&$K$9$k$H!"%.%j%7%cJ8;z$d%X%V%i%$J8;z$J$I$NHs(BLatin$BJ8;z$N$J$+$K$O!"(B
$B$H$F$b8+Fq$/$J$k$N$b$,$"$k$,!"$=$N8@8l$rCN$C$F$$$k?M$K$O(B
$B>/$J$/$H$bFI$a$k!#!K(B
1$BJ8;z$G$b2hLL>e$O?t7e$r@j$a$^$9$,!"(B
$B<B:]$K$OC10l$NJ8;z$G$"$j!"(BEmacs$B$N$9$Y$F$N%3%^%s%I$b(B1$BJ8;z$H$7$F07$$$^$9!#(B

@vindex dos-unsupported-character-glyph
@c   Not all characters in DOS codepages correspond to ISO 8859
@c characters---some are used for other purposes, such as box-drawing
@c characters and other graphics.  Emacs cannot represent these characters
@c internally, so when you read a file that uses these characters, they are
@c converted into a particular character code, specified by the variable
@c @code{dos-unsupported-character-glyph}.
DOS$B%3!<%I%Z!<%8Fb$N$9$Y$F$NJ8;z$,(BISO 8859$BJ8;z$KBP1~$9$k$o$1$G$O$J$/!"(B
$BH"$rIA$/$?$a$NJ8;z$dB>$N?^7AMQJ8;z$b$"$j$^$9!#(B
Emacs$BFbIt$G$O$3$l$i$NJ8;z$rI=8=$G$-$^$;$s$N$G!"(B
$B$3$l$i$NJ8;z$r4^$s$@%U%!%$%k$rFI$_9~$`$H!"(B
$B$3$l$i$NJ8;z$O!"JQ?t(B@code{dos-unsupported-character-glyph}$B$G;XDj$7$?(B
$BFCDj$NJ8;z%3!<%I$KJQ49$5$l$^$9!#(B

@c   Emacs supports many other characters sets aside from ISO 8859, but it
@c cannot display them on MS-DOS.  So if one of these multibyte characters
@c appears in a buffer, Emacs on MS-DOS displays them as specified by the
@c @code{dos-unsupported-character-glyph} variable; by default, this glyph
@c is an empty triangle.  Use the @kbd{C-u C-x =} command to display the
@c actual code and character set of such characters.  @xref{Position Info}.
Emacs$B$O!"(BISO 8859$B0J30$NB>$NB?$/J8;z=89g$r07$($^$9$,!"(B
$B$=$l$i$r(BMS-DOS$B>e$G$OI=<($G$-$^$;$s!#(B
$B$=$N$h$&$J%^%k%A%P%$%HJ8;z$,%P%C%U%!Fb$K$"$k$H!"(B
MS-DOS$B>e$N(BEmacs$B$O!"JQ?t(B@code{dos-unsupported-character-glyph}$B$N(B
$B;XDj$I$*$j$KI=<($7$^$9!#(B
$B%G%U%)%k%H$G$O!"$=$N;z7A$O!"GrH4$-$N;03Q7A$G$9!#(B
$B%3%^%s%I(B@kbd{C-u C-x =}$B$r;H$C$F!"$=$N$h$&$JJ8;z$N(B
$B<B:]$NJ8;z%3!<%I$HJ8;z=89g$rI=<($7$F$/$@$5$$!#(B
@xref{Position Info}$B!#(B

@findex codepage-setup
@c   By default, Emacs defines a coding system to support the current
@c codepage.  To define a coding system for some other codepage (e.g., to
@c visit a file written on a DOS machine in another country), use the
@c @kbd{M-x codepage-setup} command.  It prompts for the 3-digit code of
@c the codepage, with completion, then creates the coding system for the
@c specified codepage.  You can then use the new coding system to read and
@c write files, but you must specify it explicitly for the file command
@c when you want to use it (@pxref{Specify Coding}).
$B%G%U%)%k%H$G$O!"(BEmacs$B$O%+%l%s%H%3!<%I%Z!<%8$r07$($k%3!<%G%#%s%0%7%9%F%`$r(B
$BDj5A$7$^$9!#(B
$B!JB>9q$N(BDOS$B%^%7%s$G=q$$$?%U%!%$%k$rK,Ld$9$k$J$I$N!K(B
$BB>$N%3!<%I%Z!<%8MQ$N%3!<%G%#%s%0%7%9%F%`$rDj5A$9$k$K$O!"(B
$B%3%^%s%I(B@kbd{M-x codepage-setup}$B$r;H$$$^$9!#(B
$B$3$l$O!"(B3$B7e$N%3!<%I%Z!<%8HV9f$rLd$$9g$o$;$F$-$^$9$,!"Jd40$r;H$($^$9!#(B
$B$=$7$F!";XDj$7$?%3!<%I%Z!<%8MQ$N%3!<%G%#%s%0%7%9%F%`$r:n@.$7$^$9!#(B
$B$3$l$G!"?7$?$J%3!<%G%#%s%0%7%9%F%`$r;H$C$F%U%!%$%k$rFI$_=q$-$G$-$^$9$,!"(B
$B$3$N%3!<%G%#%s%0%7%9%F%`$r;H$&$K$O!"(B
$B%U%!%$%k%3%^%s%I$GL@<($9$kI,MW$,$"$j$^$9!J(B@pxref{Specify Coding}$B!K!#(B

@c   These coding systems are also useful for visiting a file encoded using
@c a DOS codepage, using Emacs running on some other operating system.
$B$3$l$i$N%3!<%G%#%s%0%7%9%F%`$O!"(B
DOS$B%3!<%I%Z!<%8$GId9f2=$7$?%U%!%$%k$r(B
$BB>$N%*%Z%l!<%F%#%s%0%7%9%F%`>e$N(BEmacs$B$GK,Ld$9$k>l9g$K$bMxMQ$G$-$^$9!#(B

@node MS-DOS Processes
@c @section Subprocesses on MS-DOS
@section $B%5%V%W%m%;%9!J(BMS-DOS$B!K(B

@c @cindex compilation under MS-DOS
@c @cindex inferior processes under MS-DOS
@cindex $B%3%s%Q%$%k!J(BMS-DOS$B!K(B
@cindex $B2<0L%W%m%;%9!J(BMS-DOS$B!K(B
@c @findex compile @r{(MS-DOS)}
@c @findex grep @r{(MS-DOS)}
@findex compile @r{$B!J(BMS-DOS$B!K(B}
@findex grep @r{$B!J(BMS-DOS$B!K(B}
@c   Because MS-DOS is a single-process ``operating system,''
@c asynchronous subprocesses are not available.  In particular, Shell
@c mode and its variants do not work.  Most Emacs features that use
@c asynchronous subprocesses also don't work on MS-DOS, including
@c spelling correction and GUD.  When in doubt, try and see; commands that
@c don't work print an error message saying that asynchronous processes
@c aren't supported.
MS-DOS$B$O%7%s%0%k%W%m%;%9$N!X%*%Z%l!<%F%#%s%0%7%9%F%`!Y$J$N$G!"(B
$BHsF14|$J%5%V%W%m%;%9$OMxMQ$G$-$^$;$s!#(B
$BFC$K!"%7%'%k!J(Bshell$B!K%b!<%I$d$=$NGI@8%b!<%I$OF0$-$^$;$s!#(B
$BDV$j$N=$@5$d(BGUD$B$J$I$NHsF14|$N%5%V%W%m%;%9$rMQ$$$?(BEmacs$B$N5!G=$N$[$H$s$I$O!"(B
MS-DOS$B$G$OF0$-$^$;$s!#(B
$B5?$&$J$i$P;n$7$F$_$F$/$@$5$$!#(B
$BF0:nITG=$J%3%^%s%I$O!"!VHsF14|%5%V%W%m%;%9$r;H$($J$$!W;]$N(B
$B%(%i!<%a%C%;!<%8$r=PNO$7$^$9!#(B

@c   Compilation under Emacs with @kbd{M-x compile}, searching files with
@c @kbd{M-x grep} and displaying differences between files with @kbd{M-x
@c diff} do work, by running the inferior processes synchronously.  This
@c means you cannot do any more editing until the inferior process
@c finishes.
MS-DOS$BMQ(BEmacs$B$G$b!"(B
@kbd{M-x compile}$B$K$h$k%3%s%Q%$%k!"(B
@kbd{M-x grep}$B$K$h$k%U%!%$%k$NC5:w!"(B
@kbd{M-x diff}$B$K$h$k%U%!%$%k$NHf3S$OF0:n$7$^$9$,!"(B
$B$3$l$i$O2<0L%W%m%;%9$rF14|$7$FAv$i$;$^$9!#(B
$B$D$^$j!"2<0L%W%m%;%9$,=*N;$9$k$^$G$O$$$C$5$$JT=8$O$G$-$^$;$s!#(B

@c   By contrast, Emacs compiled as native Windows application
@c @strong{does} support asynchronous subprocesses.  @xref{Windows
@c Processes}.
$BBP>HE*$K!"(BWindows$B@lMQ$K%3%s%Q%$%k$7$?(BEmacs$B$G$O!"(B
$BHsF14|%W%m%;%9$r;H$($^$9!#(B
@xref{Windows Processes}$B!#(B

@c @cindex printing under MS-DOS
@cindex $B0u:~!J(BMS-DOS$B!K(B
@c   Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
@c @code{ps-print-buffer} (@pxref{Postscript}), work in MS-DOS by sending
@c the output to one of the printer ports.  @xref{MS-DOS Printing}.
@code{lpr-buffer}$B!J(B@pxref{Hardcopy}$B!K$d(B
@code{ps-print-buffer}$B!J(B@pxref{Postscript}$B!K$N$h$&$J0u:~%3%^%s%I$O!"(B
MS-DOS$B$G$O%W%j%s%?%]!<%H$N(B1$B$D$K=PNO$rAw$k$3$H$GF0:n$7$^$9!#(B
@xref{MS-DOS Printing}$B!#(B

@c   When you run a subprocess synchronously on MS-DOS, make sure the
@c program terminates and does not try to read keyboard input.  If the
@c program does not terminate on its own, you will be unable to terminate
@c it, because MS-DOS provides no general way to terminate a process.
@c Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
@c cases.
MS-DOS$B$GF14|E*$K%5%V%W%m%;%9$rF0$+$9>l9g$K$O!"(B
$B%W%m%0%i%`$,3N<B$K=*N;$7!"$7$+$b!"%-!<%\!<%I$+$i$^$C$?$/F~NO$7$J$$$3$H$r(B
$B3NG'$7$F$/$@$5$$!#(B
MS-DOS$B$K$O%W%m%;%9$r=*N;$5$;$k0lHLE*$JJ}K!$,$J$$$N$G!"(B
$B%W%m%0%i%`$,$_$:$+$i=*N;$G$-$J$$>l9g$K$O!"(B
$B$=$l$r=*N;$5$;$k$3$H$,$G$-$J$/$J$j$^$9!#(B
$B$3$N$h$&$J>l9g!"(B
@kbd{C-c}$B$d(B@kbd{C-@key{BREAK}}$B$r2!$9$H=u$+$k>l9g$b$"$j$^$9!#(B

@c   Accessing files on other machines is not supported on MS-DOS.  Other
@c network-oriented commands such as sending mail, Web browsing, remote
@c login, etc., don't work either, unless network access is built into
@c MS-DOS with some network redirector.
MS-DOS$B$G$O!"B>$N%^%7%s$N%U%!%$%k$r;2>H$9$k$3$H$O$G$-$^$;$s!#(B
MS-DOS$B$K%M%C%H%o!<%/5!G=$,AH$_9~$^$l$F$$$J$1$l$P!"(B
$B%a%$%k$NAw?.!"(BWeb$B$N1\Mw!"%j%b!<%H%m%0%$%s$J$I$N(B
$B%M%C%H%o!<%/8~$1$N%3%^%s%I$b;H$($^$;$s!#(B

@c @cindex directory listing on MS-DOS
@c @vindex dired-listing-switches @r{(MS-DOS)}
@cindex $B%G%#%l%/%H%j$N0lMw!J(BMS-DOS$B!K(B
@vindex dired-listing-switches @r{$B!J(BMS-DOS$B!K(B}
@c   Dired on MS-DOS uses the @code{ls-lisp} package where other
@c platforms use the system @code{ls} command.  Therefore, Dired on
@c MS-DOS supports only some of the possible options you can mention in
@c the @code{dired-listing-switches} variable.  The options that work are
@c @samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
@c @samp{-s}, @samp{-t}, and @samp{-u}.
MS-DOS$B$G$N(Bdired$B$O!"(B
$BB>$N%7%9%F%`$G$O%7%9%F%`$N(B@code{ls}$B%3%^%s%I$r;H$&>lLL$G(B
$B%Q%C%1!<%8(B@code{ls-lisp}$B$r;H$$$^$9!#(B
$B$7$?$,$C$F!"(BMS-DOS$B$N(Bdired$B$G$O(B
$BJQ?t(B@code{dired-listing-switches}$B$K@_Dj$G$-$k%*%W%7%g%s$O8B$i$l$^$9!#(B
$B;H$($k%*%W%7%g%s$O!"(B
@samp{-A}$B!"(B@samp{-a}$B!"(B@samp{-c}$B!"(B@samp{-i}$B!"(B@samp{-r}$B!"(B@samp{-S}$B!"(B
@samp{-s}$B!"(B@samp{-t}$B!"(B@samp{-u}$B$G$9!#(B

@node Windows Processes
@c @section Subprocesses on Windows 95 and NT
@section $B%5%V%W%m%;%9!J(BWindows 95$B!"(BNT$B!K(B

@c Emacs compiled as a native Windows application (as opposed to the DOS
@c version) includes full support for asynchronous subprocesses.
@c In the Windows version, synchronous and asynchronous subprocesses work
@c fine on both
@c Windows 95 and Windows NT as long as you run only 32-bit Windows
@c applications.  However, when you run a DOS application in a subprocess,
@c you may encounter problems or be unable to run the application at all;
@c and if you run two DOS applications at the same time in two
@c subprocesses, you may have to reboot your system.
$B!J(BDOS$BHG$HBPHf$7$F!K(BWindows$B@lMQ$K%3%s%Q%$%k$7$?(BEmacs$B$G$O!"(B
$BHsF14|$N%5%V%W%m%;%9$r40A4$K;H$($^$9!#(B
Windows$BHG$G$O!"(B32$B%S%C%H$N(BWindows$B%"%W%j%1!<%7%g%s$r<B9T$7$F$$$k8B$j$O!"(B
$BF14|$G$"$lHsF14|$G$"$l%5%V%W%m%;%9$O$&$^$/F0:n$7$^$9!#(B
$B$7$+$7!"%5%V%W%m%;%9$G(BDOS$B%"%W%j%1!<%7%g%s$r<B9T$9$k$H!"(B
$B%"%W%j%1!<%7%g%s$N<B9T$KLdBj$r@8$8$?$j<B9T$G$-$J$+$C$?$j$7$^$9!#(B
$B$5$i$K!"(B2$B$D$N(BDOS$B%"%W%j%1!<%7%g%s$rF1;~$K(B2$B$D$N%5%V%W%m%;%9$G<B9T$9$k$H!"(B
$B%7%9%F%`$r%j%V!<%H$7$J$1$l$P$J$i$J$/$J$j$^$9!#(B

@c Since the standard command interpreter (and most command line utilities)
@c on Windows 95 are DOS applications, these problems are significant when
@c using that system.  But there's nothing we can do about them; only
@c Microsoft can fix them.
Windows 95$B$NI8=`$N%3%^%s%I%$%s%?!<%W%j%?(B
$B!J$*$h$S!"$[$H$s$I$N%3%^%s%I9T%f!<%F%#%j%F%#!K$O(BDOS$B%"%W%j%1!<%7%g%s$J$N$G!"(B
$B$3$N<o$N%7%9%F%`$r;H$&>l9g$K$O>e5-$NLdBj$O=EMW$K$J$j$^$9!#(B
$B$7$+$7!"$3$l$K4X$7$F$o$l$o$l$K$G$-$k$3$H$O2?$b$J$/!"(B
Microsoft$B$@$1$,=$@5$G$-$k$N$G$9!#(B

@c If you run just one DOS application subprocess, the subprocess should
@c work as expected as long as it is ``well-behaved'' and does not perform
@c direct screen access or other unusual actions.  If you have a CPU
@c monitor application, your machine will appear to be 100% busy even when
@c the DOS application is idle, but this is only an artifact of the way CPU
@c monitors measure processor load.
DOS$B%"%W%j%1!<%7%g%s$N%5%V%W%m%;%9$r(B1$B$D$@$1<B9T$9$k$J$i$P!"(B
$B!X9T57$,$h$/!Y$F!"$7$+$b!"2hLL$rD>@\A`:n$9$k$J$I$N(B
$BHsI8=`E*$JF0:n$r$7$J$$8B$j$O!"%5%V%W%m%;%9$OM=A[$I$*$j$KF0:n$9$k$O$:$G$9!#(B
CPU$B%b%K%?!J4F;k!K%"%W%j%1!<%7%g%s$r;H$&$H!"(B
DOS$B%"%W%j%1!<%7%g%s$,Dd;_$7$F$$$k$H$-$G$5$($b!"(B
$B%^%7%s$O(B100%$B%S%8!<$K$J$j$^$9$,!"(B
$B$3$l$O(BCPU$B%b%K%?$,%W%m%;%C%5$NIi2Y$rD4$Y$kJ}K!$K5/0x$7$^$9!#(B

@c You must terminate the DOS application before you start any other DOS
@c application in a different subprocess.  Emacs is unable to interrupt or
@c terminate a DOS subprocess.  The only way you can terminate such a
@c subprocess is by giving it a command that tells its program to exit.
$BJL$N%5%V%W%m%;%9$G(BDOS$B%"%W%j%1!<%7%g%s$r<B9T$9$k>l9g$K$O!"(B
$B$^$($b$C$F(BDOS$B%"%W%j%1!<%7%g%s$r=*N;$7$F$*$/I,MW$,$"$j$^$9!#(B
Emacs$B$O!"(BDOS$B$N%5%V%W%m%;%9$K3d$j9~$s$@$jDd;_$5$;$k$3$H$,$G$-$^$;$s!#(B
$B$3$N$h$&$J%5%V%W%m%;%9$r=*N;$9$kM#0l$NJ}K!$O!"(B
$B$=$N%W%m%0%i%`$K=*N;$r;X<($9$k%3%^%s%I$rM?$($k$3$H$G$9!#(B

@c If you attempt to run two DOS applications at the same time in separate
@c subprocesses, the second one that is started will be suspended until the
@c first one finishes, even if either or both of them are asynchronous.
$BJL!9$N%5%V%W%m%;%9$K$*$$$F(B2$B$D$N(BDOS$B%"%W%j%1!<%7%g%s$rF1;~$K<B9T$7$h$&$H$9$k$H!"(B
$B0lJ}$"$k$$$ON>J}$,HsF14|$G$"$k$H$7$F$b!"(B
2$BHVL\$K5/F0$7$?$b$N$O:G=i$N$b$N$,=*N;$9$k$^$G5Y;_$7$F$7$^$$$^$9!#(B

@c If you can go to the first subprocess, and tell it to exit, the second
@c subprocess should continue normally.  However, if the second subprocess
@c is synchronous, Emacs itself will be hung until the first subprocess
@c finishes.  If it will not finish without user input, then you have no
@c choice but to reboot if you are running on Windows 95.  If you are
@c running on Windows NT, you can use a process viewer application to kill
@c the appropriate instance of ntvdm instead (this will terminate both DOS
@c subprocesses).
$B:G=i$N%5%V%W%m%;%9$rA`:n$G$-$F=*N;$r;X<($G$-$k$J$i$P!"(B
2$BHVL\$N%5%V%W%m%;%9$O@5>o$K<B9T$r7QB3$9$k$O$:$G$9!#(B
$B$7$+$7!"(B2$BHVL\$,F14|%5%V%W%m%;%9$G$"$l$P!"(B
$B:G=i$N%5%V%W%m%;%9$,=*N;$9$k$^$G$O(BEmacs$B<+BN$,8G$^$C$F$7$^$$$^$9!#(B
$B%f!<%6!<F~NO$J$7$K=*N;$G$-$J$$>l9g$K$O!"(B
Windows 95$B$r;H$C$F$$$k8B$j%j%V!<%H0J30$NA*Br$O$"$j$^$;$s!#(B
Windows NT$B$G$"$l$P!"%W%m%;%9$rD4$Y$k%"%W%j%1!<%7%g%s$r;H$C$F!"(B
$BE,Ev$J(Bntvdm$B$r=*N;$5$;$^$9!J$9$k$H(BDOS$B$N(B2$B$D$N%5%V%W%m%;%9$b=*N;$7$^$9!K!#(B

@c If you have to reboot Windows 95 in this situation, do not use the
@c @code{Shutdown} command on the @code{Start} menu; that usually hangs the
@c system.  Instead, type @kbd{CTL-ALT-@key{DEL}} and then choose
@c @code{Shutdown}.  That usually works, although it may take a few minutes
@c to do its job.
$B$3$N$h$&$J>u67$G(BWindows 95$B$r%j%V!<%H$9$k$3$H$,I,MW$K$J$C$?$H$-$K$O!"(B
@code{Start}$B%a%K%e!<$NCf$N(B@code{Shutdown}$B%3%^%s%I$r;H$C$F$O$$$1$^$;$s!#(B
$B$?$$$F$$$N>l9g!"%7%9%F%`$,8G$^$C$F$7$^$$$^$9!#(B
$B$+$o$j$K!"(B@kbd{CTL-ALT-@key{DEL}}$B$rBG80$7$F(B@code{Shutdown}$B$rA*$S$^$9!#(B
$B=hM}$K?tJ,$+$+$k>l9g$b$"$j$^$9$,!"B?$/$N>l9g!"5!G=$7$F$/$l$^$9!#(B

@node Windows System Menu
@c @section Using the System Menu on Windows
@section Windows$B$N%7%9%F%`%a%K%e!<$NMxMQ(B

@c Emacs compiled as a native Windows application normally turns off the
@c Windows feature that tapping the @key{ALT}
@c key invokes the Windows menu.  The reason is that the @key{ALT} also
@c serves as @key{META} in Emacs.  When using Emacs, users often press the
@c @key{META} key temporarily and then change their minds; if this has the
@c effect of bringing up the Windows menu, it alters the meaning of
@c subsequent commands.  Many users find this frustrating. 
Windows$B@lMQ$K%3%s%Q%$%k$7$?(BEmacs$B$G$O!"(B
@key{ALT}$B%-!<$r2!$7$F(BWindows$B$N%a%K%e!<$rN)$A>e$2$k5!G=$r@Z$C$F$"$j$^$9!#(B
$B$3$l$O!"(BEmacs$B$G$O(B@key{ALT}$B$O(B@key{META}$B$NF/$-$r$9$k$+$i$G$9!#(B
Emacs$B$rMxMQ$7$F$$$k$H$-$K$O!"(B
$B%f!<%6!<$O$7$P$7$P$$$C$?$s(B@key{META}$B%-!<$r2!$7$F$+$i2?$b$;$:$KJ|$7$^$9!#(B
$B$3$NF0:n$G(BWindows$B$N%a%K%e!<$,N)$A>e$,$C$F$7$^$&$H!"(B
$B0J9_$N%3%^%s%I$N0UL#$,JQ$C$F$7$^$$$^$9!#(B
$BB?$/$N%f!<%6!<$K$O$3$l$G$O<YKb$G$7$g$&!#(B

@vindex w32-pass-alt-to-system
@c You can reenable Windows's default handling of tapping the @key{ALT} key
@c by setting @code{w32-pass-alt-to-system} to a non-@code{nil} value.
@code{w32-pass-alt-to-system}$B$K(B@code{nil}$B0J30$NCM$r@_Dj$9$l$P!"(B
@key{ALT}$B%-!<$r2!$7$?$H$-$N=hM}$O(BWindows$B$N%G%U%)%k%H$KLa$j$^$9!#(B