aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/ChangeLog6
-rw-r--r--man/building.texi2
-rw-r--r--man/emacs-xtra.texi682
-rw-r--r--man/emacs.texi19
-rw-r--r--man/frames.texi2
-rw-r--r--man/gnu.texi2
-rw-r--r--man/macos.texi2
-rw-r--r--man/msdog.texi682
-rw-r--r--man/mule.texi2
-rw-r--r--man/trouble.texi3
10 files changed, 716 insertions, 686 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 48712e9c81a..c6ad56970a6 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -7,6 +7,12 @@
7 7
82006-04-09 Karl Berry <karl@gnu.org> 82006-04-09 Karl Berry <karl@gnu.org>
9 9
10 * msdog.texi, emacs-xtra.texi: move all the MS-DOS material to
11 emacs-xtra.texi, leaving only MS Windows information.
12 * building.texi, emacs.texi, frames.texi, gnu.texi, macos.texi,
13 msdog.texi, mule.texi, trouble.texi: change cross-references and
14 node names.
15
10 * emacs.texi: move @summarycontents and @contents to the beginning 16 * emacs.texi: move @summarycontents and @contents to the beginning
11 of the file. 17 of the file.
12 18
diff --git a/man/building.texi b/man/building.texi
index ccabf22b549..ec44b828022 100644
--- a/man/building.texi
+++ b/man/building.texi
@@ -323,7 +323,7 @@ method to conditionalize them.
323subprocesses; to work around this lack, @kbd{M-x compile} runs the 323subprocesses; to work around this lack, @kbd{M-x compile} runs the
324compilation command synchronously on MS-DOS. As a consequence, you must 324compilation command synchronously on MS-DOS. As a consequence, you must
325wait until the command finishes before you can do anything else in 325wait until the command finishes before you can do anything else in
326Emacs. @xref{MS-DOS}. 326Emacs. @xref{MS-DOS,,,emacs-xtra,Specialized Emacs Features}.
327 327
328@node Grep Searching 328@node Grep Searching
329@section Searching with Grep under Emacs 329@section Searching with Grep under Emacs
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi
index 4aff9716f75..7f7574d05e5 100644
--- a/man/emacs-xtra.texi
+++ b/man/emacs-xtra.texi
@@ -64,6 +64,7 @@ license to the document, as described in section 6 of the license.
64* Picture Mode:: Editing pictures made up of characters 64* Picture Mode:: Editing pictures made up of characters
65 using the quarter-plane screen model. 65 using the quarter-plane screen model.
66* Fortran:: Fortran mode and its special features. 66* Fortran:: Fortran mode and its special features.
67* MS-DOG::
67* Index:: 68* Index::
68@end menu 69@end menu
69 70
@@ -2406,6 +2407,687 @@ to @samp{continue}, provided Abbrev mode is enabled.@refill
2406 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in 2407 Type @samp{;?} or @samp{;C-h} to display a list of all the built-in
2407Fortran abbrevs and what they stand for. 2408Fortran abbrevs and what they stand for.
2408 2409
2410
2411@node MS-DOG
2412@chapter Emacs and MS-DOS
2413@cindex MS-DOG
2414@cindex MS-DOS peculiarities
2415
2416 This section briefly describes the peculiarities of using Emacs on
2417the MS-DOS ``operating system'' (also known as ``MS-DOG'').
2418Information about Emacs and Microsoft's current operating system
2419Windows (also known as ``Losedows) is in the main Emacs manual
2420(@pxref{Emacs and Microsoft Systems,,, emacs, the Emacs Manual}).
2421
2422 If you build Emacs for MS-DOS, the binary will also run on Windows
24233.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS
2424application; all of this chapter applies for all of those systems, if
2425you use an Emacs that was built for MS-DOS.
2426
2427 @xref{Text and Binary,,,emacs, the Emacs Manual}, for information
2428about Emacs' special handling of text files under MS-DOS (and
2429Windows).
2430
2431@menu
2432* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS.
2433* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
2434* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
2435* Files: MS-DOS File Names. File name conventions on MS-DOS.
2436* Printing: MS-DOS Printing. How to specify the printer on MS-DOS.
2437* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
2438* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
2439@end menu
2440
2441@node MS-DOS Keyboard
2442@section Keyboard Usage on MS-DOS
2443
2444@kindex DEL @r{(MS-DOS)}
2445@kindex BS @r{(MS-DOS)}
2446 The key that is called @key{DEL} in Emacs (because that's how it is
2447designated on most workstations) is known as @key{BS} (backspace) on a
2448PC. That is why the PC-specific terminal initialization remaps the
2449@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
2450as @kbd{C-d} for the same reasons.
2451
2452@kindex C-g @r{(MS-DOS)}
2453@kindex C-BREAK @r{(MS-DOS)}
2454@cindex quitting on MS-DOS
2455 Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
2456character, just like @kbd{C-g}. This is because Emacs cannot detect
2457that you have typed @kbd{C-g} until it is ready for more input. As a
2458consequence, you cannot use @kbd{C-g} to stop a running command
2459(@pxref{Quitting,,,emacs, the Emacs Manual}). By contrast,
2460@kbd{C-@key{BREAK}} @emph{is} detected as soon as you type it (as
2461@kbd{C-g} is on other systems), so it can be used to stop a running
2462command and for emergency escape (@pxref{Emergency Escape,,,emacs, the
2463Emacs Manual}).
2464
2465@cindex Meta (under MS-DOS)
2466@cindex Hyper (under MS-DOS)
2467@cindex Super (under MS-DOS)
2468@vindex dos-super-key
2469@vindex dos-hyper-key
2470 The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
2471You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
2472choose either the right @key{CTRL} key or the right @key{ALT} key by
2473setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
2474or 2 respectively. If neither @code{dos-super-key} nor
2475@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
2476also mapped to the @key{META} key. However, if the MS-DOS international
2477keyboard support program @file{KEYB.COM} is installed, Emacs will
2478@emph{not} map the right @key{ALT} to @key{META}, since it is used for
2479accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
2480layouts; in this case, you may only use the left @key{ALT} as @key{META}
2481key.
2482
2483@kindex C-j @r{(MS-DOS)}
2484@vindex dos-keypad-mode
2485 The variable @code{dos-keypad-mode} is a flag variable that controls
2486what key codes are returned by keys in the numeric keypad. You can also
2487define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
2488following line into your @file{_emacs} file:
2489
2490@smallexample
2491;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
2492(define-key function-key-map [kp-enter] [?\C-j])
2493@end smallexample
2494
2495@node MS-DOS Mouse
2496@section Mouse Usage on MS-DOS
2497
2498@cindex mouse support under MS-DOS
2499 Emacs on MS-DOS supports a mouse (on the default terminal only).
2500The mouse commands work as documented, including those that use menus
2501and the menu bar (@pxref{Menu Bar,,,emacs, the Emacs Manual}). Scroll
2502bars don't work in MS-DOS Emacs. PC mice usually have only two
2503buttons; these act as @kbd{Mouse-1} and @kbd{Mouse-2}, but if you
2504press both of them together, that has the effect of @kbd{Mouse-3}. If
2505the mouse does have 3 buttons, Emacs detects that at startup, and all
2506the 3 buttons function normally, as on X.
2507
2508 Help strings for menu-bar and pop-up menus are displayed in the echo
2509area when the mouse pointer moves across the menu items. Highlighting
2510of mouse-sensitive text (@pxref{Mouse References,,,emacs, the Emacs
2511Manual}) is also supported.
2512
2513@cindex mouse, set number of buttons
2514@findex msdos-set-mouse-buttons
2515 Some versions of mouse drivers don't report the number of mouse
2516buttons correctly. For example, mice with a wheel report that they
2517have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
2518the wheel, which serves as the middle button, are not passed. In
2519these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
2520to tell Emacs how many mouse buttons to expect. You could make such a
2521setting permanent by adding this fragment to your @file{_emacs} init
2522file:
2523
2524@example
2525;; @r{Treat the mouse like a 2-button mouse.}
2526(msdos-set-mouse-buttons 2)
2527@end example
2528
2529@cindex Windows clipboard support
2530 Emacs built for MS-DOS supports clipboard operations when it runs on
2531Windows. Commands that put text on the kill ring, or yank text from
2532the ring, check the Windows clipboard first, just as Emacs does on the
2533X Window System (@pxref{Mouse Commands,,,emacs, the Emacs Manual}).
2534Only the primary selection and the cut buffer are supported by MS-DOS
2535Emacs on Windows; the secondary selection always appears as empty.
2536
2537 Due to the way clipboard access is implemented by Windows, the
2538length of text you can put into the clipboard is limited by the amount
2539of free DOS memory that is available to Emacs. Usually, up to 620KB of
2540text can be put into the clipboard, but this limit depends on the system
2541configuration and is lower if you run Emacs as a subprocess of
2542another program. If the killed text does not fit, Emacs outputs a
2543message saying so, and does not put the text into the clipboard.
2544
2545 Null characters also cannot be put into the Windows clipboard. If the
2546killed text includes null characters, Emacs does not put such text into
2547the clipboard, and displays in the echo area a message to that effect.
2548
2549@vindex dos-display-scancodes
2550 The variable @code{dos-display-scancodes}, when non-@code{nil},
2551directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
2552each keystroke; this feature serves as a complement to the
2553@code{view-lossage} command, for debugging.
2554
2555@node MS-DOS Display
2556@section Display on MS-DOS
2557@cindex faces under MS-DOS
2558@cindex fonts, emulating under MS-DOS
2559
2560 Display on MS-DOS cannot use font variants, like bold or italic, but
2561it does support multiple faces, each of which can specify a foreground
2562and a background color. Therefore, you can get the full functionality
2563of Emacs packages that use fonts (such as @code{font-lock}, Enriched
2564Text mode, and others) by defining the relevant faces to use different
2565colors. Use the @code{list-colors-display} command (@pxref{Frame
2566Parameters,,,emacs, the Emacs Manual}) and the
2567@code{list-faces-display} command (@pxref{Faces,,,emacs, the Emacs
2568Manual}) to see what colors and faces are available and what they look
2569like.
2570
2571 @xref{MS-DOS and MULE}, later in this chapter, for information on
2572how Emacs displays glyphs and characters that aren't supported by the
2573native font built into the DOS display.
2574
2575@cindex cursor shape on MS-DOS
2576 When Emacs starts, it changes the cursor shape to a solid box. This
2577is for compatibility with other systems, where the box cursor is the
2578default in Emacs. This default shape can be changed to a bar by
2579specifying the @code{cursor-type} parameter in the variable
2580@code{default-frame-alist} (@pxref{Creating Frames,,,emacs, the Emacs
2581Manual}). The MS-DOS terminal doesn't support a vertical-bar cursor,
2582so the bar cursor is horizontal, and the @code{@var{width}} parameter,
2583if specified by the frame parameters, actually determines its height.
2584For this reason, the @code{bar} and @code{hbar} cursor types produce
2585the same effect on MS-DOS. As an extension, the bar cursor
2586specification can include the starting scan line of the cursor as well
2587as its width, like this:
2588
2589@example
2590 '(cursor-type bar @var{width} . @var{start})
2591@end example
2592
2593@noindent
2594In addition, if the @var{width} parameter is negative, the cursor bar
2595begins at the top of the character cell.
2596
2597@cindex frames on MS-DOS
2598 The MS-DOS terminal can only display a single frame at a time. The
2599Emacs frame facilities work on MS-DOS much as they do on text-only
2600terminals (@pxref{Frames,,,emacs, the Emacs Manual}). When you run
2601Emacs from a DOS window on MS-Windows, you can make the visible frame
2602smaller than the full screen, but Emacs still cannot display more than
2603a single frame at a time.
2604
2605@cindex frame size under MS-DOS
2606@findex mode4350
2607@findex mode25
2608 The @code{mode4350} command switches the display to 43 or 50
2609lines, depending on your hardware; the @code{mode25} command switches
2610to the default 80x25 screen size.
2611
2612 By default, Emacs only knows how to set screen sizes of 80 columns by
261325, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
2614special video modes that will switch the display to other sizes, you can
2615have Emacs support those too. When you ask Emacs to switch the frame to
2616@var{n} rows by @var{m} columns dimensions, it checks if there is a
2617variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
2618uses its value (which must be an integer) as the video mode to switch
2619to. (Emacs switches to that video mode by calling the BIOS @code{Set
2620Video Mode} function with the value of
2621@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
2622For example, suppose your adapter will switch to 66x80 dimensions when
2623put into video mode 85. Then you can make Emacs support this screen
2624size by putting the following into your @file{_emacs} file:
2625
2626@example
2627(setq screen-dimensions-66x80 85)
2628@end example
2629
2630 Since Emacs on MS-DOS can only set the frame size to specific
2631supported dimensions, it cannot honor every possible frame resizing
2632request. When an unsupported size is requested, Emacs chooses the next
2633larger supported size beyond the specified size. For example, if you
2634ask for 36x80 frame, you will get 40x80 instead.
2635
2636 The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
2637when they exactly match the specified size; the search for the next
2638larger supported size ignores them. In the above example, even if your
2639VGA supports 38x80 dimensions and you define a variable
2640@code{screen-dimensions-38x80} with a suitable value, you will still get
264140x80 screen when you ask for a 36x80 frame. If you want to get the
264238x80 size in this case, you can do it by setting the variable named
2643@code{screen-dimensions-36x80} with the same video mode value as
2644@code{screen-dimensions-38x80}.
2645
2646 Changing frame dimensions on MS-DOS has the effect of changing all the
2647other frames to the new dimensions.
2648
2649@node MS-DOS File Names
2650@section File Names on MS-DOS
2651@cindex file names under MS-DOS
2652@cindex init file, default name under MS-DOS
2653
2654 MS-DOS normally uses a backslash, @samp{\}, to separate name units
2655within a file name, instead of the slash used on other systems. Emacs
2656on MS-DOS permits use of either slash or backslash, and also knows
2657about drive letters in file names.
2658
2659 On MS-DOS, file names are case-insensitive and limited to eight
2660characters, plus optionally a period and three more characters. Emacs
2661knows enough about these limitations to handle file names that were
2662meant for other operating systems. For instance, leading dots
2663@samp{.} in file names are invalid in MS-DOS, so Emacs transparently
2664converts them to underscores @samp{_}; thus your default init file
2665(@pxref{Init File,,,emacs, the Emacs Manual}) is called @file{_emacs}
2666on MS-DOS. Excess characters before or after the period are generally
2667ignored by MS-DOS itself; thus, if you visit the file
2668@file{LongFileName.EvenLongerExtension}, you will silently get
2669@file{longfile.eve}, but Emacs will still display the long file name
2670on the mode line. Other than that, it's up to you to specify file
2671names which are valid under MS-DOS; the transparent conversion as
2672described above only works on file names built into Emacs.
2673
2674@cindex backup file names on MS-DOS
2675 The above restrictions on the file names on MS-DOS make it almost
2676impossible to construct the name of a backup file (@pxref{Backup
2677Names,,,emacs, the Emacs Manual}) without losing some of the original
2678file name characters. For example, the name of a backup file for
2679@file{docs.txt} is @file{docs.tx~} even if single backup is used.
2680
2681@cindex file names under Windows 95/NT
2682@cindex long file names in DOS box under Windows 95/NT
2683 If you run Emacs as a DOS application under Windows 9X, Windows ME, or
2684Windows 2000, you can turn on support for long file names. If you do
2685that, Emacs doesn't truncate file names or convert them to lower case;
2686instead, it uses the file names that you specify, verbatim. To enable
2687long file name support, set the environment variable @env{LFN} to
2688@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
2689DOS programs to access long file names, so Emacs built for MS-DOS will
2690only see their short 8+3 aliases.
2691
2692@cindex @env{HOME} directory under MS-DOS
2693 MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
2694that the directory where it is installed is the value of the @env{HOME}
2695environment variable. That is, if your Emacs binary,
2696@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
2697Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
2698particular, that is where Emacs looks for the init file @file{_emacs}.
2699With this in mind, you can use @samp{~} in file names as an alias for
2700the home directory, as you would on GNU or Unix. You can also set
2701@env{HOME} variable in the environment before starting Emacs; its
2702value will then override the above default behavior.
2703
2704 Emacs on MS-DOS handles the directory name @file{/dev} specially,
2705because of a feature in the emulator libraries of DJGPP that pretends
2706I/O devices have names in that directory. We recommend that you avoid
2707using an actual directory named @file{/dev} on any disk.
2708
2709@node MS-DOS Printing
2710@section Printing and MS-DOS
2711
2712 Printing commands, such as @code{lpr-buffer}
2713(@pxref{Printing,,,emacs, the Emacs Manual }) and
2714@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual})
2715can work in MS-DOS and MS-Windows by sending the output to one of the
2716printer ports, if a Posix-style @code{lpr} program is unavailable.
2717The same Emacs variables control printing on all systems, but in some
2718cases they have different default values on MS-DOS and MS-Windows.
2719
2720@vindex printer-name @r{(MS-DOS)}
2721 If you want to use your local printer, printing on it in the usual DOS
2722manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
2723default value) and @code{printer-name} to the name of the printer
2724port---for example, @code{"PRN"}, the usual local printer port (that's
2725the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer.
2726You can also set @code{printer-name} to a file name, in which case
2727``printed'' output is actually appended to that file. If you set
2728@code{printer-name} to @code{"NUL"}, printed output is silently
2729discarded (sent to the system null device).
2730
2731 On MS-Windows, when the Windows network software is installed, you can
2732also use a printer shared by another machine by setting
2733@code{printer-name} to the UNC share name for that printer---for example,
2734@code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward
2735slashes or backslashes here.) To find out the names of shared printers,
2736run the command @samp{net view} at a DOS command prompt to obtain a list
2737of servers, and @samp{net view @var{server-name}} to see the names of printers
2738(and directories) shared by that server. Alternatively, click the
2739@samp{Network Neighborhood} icon on your desktop, and look for machines
2740which share their printers via the network.
2741
2742@cindex @samp{net use}, and printing on MS-Windows
2743@cindex networked printers (MS-Windows)
2744 If the printer doesn't appear in the output of @samp{net view}, or
2745if setting @code{printer-name} to the UNC share name doesn't produce a
2746hardcopy on that printer, you can use the @samp{net use} command to
2747connect a local print port such as @code{"LPT2"} to the networked
2748printer. For example, typing @kbd{net use LPT2:
2749\\joes_pc\hp4si}@footnote{
2750Note that the @samp{net use} command requires the UNC share name to be
2751typed with the Windows-style backslashes, while the value of
2752@code{printer-name} can be set with either forward- or backslashes.}
2753causes Windows to @dfn{capture} the LPT2 port and redirect the printed
2754material to the printer connected to the machine @code{joes_pc}.
2755After this command, setting @code{printer-name} to @code{"LPT2"}
2756should produce the hardcopy on the networked printer.
2757
2758 With some varieties of Windows network software, you can instruct
2759Windows to capture a specific printer port such as @code{"LPT2"}, and
2760redirect it to a networked printer via the @w{@code{Control
2761Panel->Printers}} applet instead of @samp{net use}.
2762
2763 Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
2764though they are connected to a Windows machine which uses a different
2765encoding for the same locale. For example, in the Latin-1 locale, DOS
2766uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
2767MULE}. When you print to such printers from Windows, you can use the
2768@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
2769@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
2770codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
2771M-x lpr-region RET} will print the region while converting it to the
2772codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
2773coding system with @kbd{M-x codepage-setup}.
2774
2775 If you set @code{printer-name} to a file name, it's best to use an
2776absolute file name. Emacs changes the working directory according to
2777the default directory of the current buffer, so if the file name in
2778@code{printer-name} is relative, you will end up with several such
2779files, each one in the directory of the buffer from which the printing
2780was done.
2781
2782@findex print-buffer @r{(MS-DOS)}
2783@findex print-region @r{(MS-DOS)}
2784@vindex lpr-headers-switches @r{(MS-DOS)}
2785 The commands @code{print-buffer} and @code{print-region} call the
2786@code{pr} program, or use special switches to the @code{lpr} program, to
2787produce headers on each printed page. MS-DOS and MS-Windows don't
2788normally have these programs, so by default, the variable
2789@code{lpr-headers-switches} is set so that the requests to print page
2790headers are silently ignored. Thus, @code{print-buffer} and
2791@code{print-region} produce the same output as @code{lpr-buffer} and
2792@code{lpr-region}, respectively. If you do have a suitable @code{pr}
2793program (for example, from GNU Textutils), set
2794@code{lpr-headers-switches} to @code{nil}; Emacs will then call
2795@code{pr} to produce the page headers, and print the resulting output as
2796specified by @code{printer-name}.
2797
2798@vindex print-region-function @r{(MS-DOS)}
2799@cindex lpr usage under MS-DOS
2800@vindex lpr-command @r{(MS-DOS)}
2801@vindex lpr-switches @r{(MS-DOS)}
2802 Finally, if you do have an @code{lpr} work-alike, you can set the
2803variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
2804@code{lpr} for printing, as on other systems. (If the name of the
2805program isn't @code{lpr}, set @code{lpr-command} to specify where to
2806find it.) The variable @code{lpr-switches} has its standard meaning
2807when @code{lpr-command} is not @code{""}. If the variable
2808@code{printer-name} has a string value, it is used as the value for the
2809@code{-P} option to @code{lpr}, as on Unix.
2810
2811@findex ps-print-buffer @r{(MS-DOS)}
2812@findex ps-spool-buffer @r{(MS-DOS)}
2813@vindex ps-printer-name @r{(MS-DOS)}
2814@vindex ps-lpr-command @r{(MS-DOS)}
2815@vindex ps-lpr-switches @r{(MS-DOS)}
2816 A parallel set of variables, @code{ps-lpr-command},
2817@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
2818Variables,,,emacs, the Emacs Manual}), defines how PostScript files
2819should be printed. These variables are used in the same way as the
2820corresponding variables described above for non-PostScript printing.
2821Thus, the value of @code{ps-printer-name} is used as the name of the
2822device (or file) to which PostScript output is sent, just as
2823@code{printer-name} is used for non-PostScript printing. (There are
2824two distinct sets of variables in case you have two printers attached
2825to two different ports, and only one of them is a PostScript printer.)
2826
2827 The default value of the variable @code{ps-lpr-command} is @code{""},
2828which causes PostScript output to be sent to the printer port specified
2829by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
2830the name of a program which will accept PostScript files. Thus, if you
2831have a non-PostScript printer, you can set this variable to the name of
2832a PostScript interpreter program (such as Ghostscript). Any switches
2833that need to be passed to the interpreter program are specified using
2834@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
2835string, it will be added to the list of switches as the value for the
2836@code{-P} option. This is probably only useful if you are using
2837@code{lpr}, so when using an interpreter typically you would set
2838@code{ps-printer-name} to something other than a string so it is
2839ignored.)
2840
2841 For example, to use Ghostscript for printing on an Epson printer
2842connected to the @samp{LPT2} port, put this in your @file{_emacs} file:
2843
2844@example
2845(setq ps-printer-name t) ; Ghostscript doesn't understand -P
2846(setq ps-lpr-command "c:/gs/gs386")
2847(setq ps-lpr-switches '("-q" "-dNOPAUSE"
2848 "-sDEVICE=epson"
2849 "-r240x72"
2850 "-sOutputFile=LPT2"
2851 "-Ic:/gs"))
2852@end example
2853
2854@noindent
2855(This assumes that Ghostscript is installed in the @file{"c:/gs"}
2856directory.)
2857
2858@vindex dos-printer
2859@vindex dos-ps-printer
2860 For backwards compatibility, the value of @code{dos-printer}
2861(@code{dos-ps-printer}), if it has a value, overrides the value of
2862@code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
2863only.
2864
2865
2866@node MS-DOS and MULE
2867@section International Support on MS-DOS
2868@cindex international support @r{(MS-DOS)}
2869
2870 Emacs on MS-DOS supports the same international character sets as it
2871does on GNU, Unix and other platforms (@pxref{International,,,emacs,
2872the Emacs Manual}), including coding systems for converting between
2873the different character sets. However, due to incompatibilities
2874between MS-DOS/MS-Windows and other systems, there are several
2875DOS-specific aspects of this support that you should be aware of.
2876This section describes these aspects.
2877
2878 The description below is largely specific to the MS-DOS port of
2879Emacs, especially where it talks about practical implications for
2880Emacs users. For other operating systems, see the @file{code-pages.el}
2881package, which implements support for MS-DOS- and MS-Windows-specific
2882encodings for all platforms other than MS-DOS.
2883
2884@table @kbd
2885@item M-x dos-codepage-setup
2886Set up Emacs display and coding systems as appropriate for the current
2887DOS codepage.
2888
2889@item M-x codepage-setup
2890Create a coding system for a certain DOS codepage.
2891@end table
2892
2893@cindex codepage, MS-DOS
2894@cindex DOS codepages
2895 MS-DOS is designed to support one character set of 256 characters at
2896any given time, but gives you a variety of character sets to choose
2897from. The alternative character sets are known as @dfn{DOS codepages}.
2898Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
2899characters (codes 128 through 255) vary from one codepage to another.
2900Each DOS codepage is identified by a 3-digit number, such as 850, 862,
2901etc.
2902
2903 In contrast to X, which lets you use several fonts at the same time,
2904MS-DOS normally doesn't allow use of several codepages in a single
2905session. MS-DOS was designed to load a single codepage at system
2906startup, and require you to reboot in order to change
2907it@footnote{Normally, one particular codepage is burnt into the
2908display memory, while other codepages can be installed by modifying
2909system configuration files, such as @file{CONFIG.SYS}, and rebooting.
2910While there is third-party software that allows changing the codepage
2911without rebooting, we describe here how a stock MS-DOS system
2912behaves.}. Much the same limitation applies when you run DOS
2913executables on other systems such as MS-Windows.
2914
2915@cindex unibyte operation @r{(MS-DOS)}
2916 If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
2917(@pxref{Initial Options,,,emacs, the Emacs Manual}), Emacs does not
2918perform any conversion of non-@acronym{ASCII} characters. Instead, it
2919reads and writes any non-@acronym{ASCII} characters verbatim, and
2920sends their 8-bit codes to the display verbatim. Thus, unibyte Emacs
2921on MS-DOS supports the current codepage, whatever it may be, but
2922cannot even represent any other characters.
2923
2924@vindex dos-codepage
2925 For multibyte operation on MS-DOS, Emacs needs to know which
2926characters the chosen DOS codepage can display. So it queries the
2927system shortly after startup to get the chosen codepage number, and
2928stores the number in the variable @code{dos-codepage}. Some systems
2929return the default value 437 for the current codepage, even though the
2930actual codepage is different. (This typically happens when you use the
2931codepage built into the display hardware.) You can specify a different
2932codepage for Emacs to use by setting the variable @code{dos-codepage} in
2933your init file.
2934
2935@cindex language environment, automatic selection on @r{MS-DOS}
2936 Multibyte Emacs supports only certain DOS codepages: those which can
2937display Far-Eastern scripts, like the Japanese codepage 932, and those
2938that encode a single ISO 8859 character set.
2939
2940 The Far-Eastern codepages can directly display one of the MULE
2941character sets for these countries, so Emacs simply sets up to use the
2942appropriate terminal coding system that is supported by the codepage.
2943The special features described in the rest of this section mostly
2944pertain to codepages that encode ISO 8859 character sets.
2945
2946 For the codepages which correspond to one of the ISO character sets,
2947Emacs knows the character set name based on the codepage number. Emacs
2948automatically creates a coding system to support reading and writing
2949files that use the current codepage, and uses this coding system by
2950default. The name of this coding system is @code{cp@var{nnn}}, where
2951@var{nnn} is the codepage number.@footnote{The standard Emacs coding
2952systems for ISO 8859 are not quite right for the purpose, because
2953typically the DOS codepage does not match the standard ISO character
2954codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
2955code 231 in the standard Latin-1 character set, but the corresponding
2956DOS codepage 850 uses code 135 for this glyph.}
2957
2958@cindex mode line @r{(MS-DOS)}
2959 All the @code{cp@var{nnn}} coding systems use the letter @samp{D}
2960(for ``DOS'') as their mode-line mnemonic. Since both the terminal
2961coding system and the default coding system for file I/O are set to
2962the proper @code{cp@var{nnn}} coding system at startup, it is normal
2963for the mode line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode
2964Line,,,emacs, the Emacs Manual}. Far-Eastern DOS terminals do not use
2965the @code{cp@var{nnn}} coding systems, and thus their initial mode
2966line looks like the Emacs default.
2967
2968 Since the codepage number also indicates which script you are using,
2969Emacs automatically runs @code{set-language-environment} to select the
2970language environment for that script (@pxref{Language
2971Environments,,,emacs, the Emacs Manual}).
2972
2973 If a buffer contains a character belonging to some other ISO 8859
2974character set, not the one that the chosen DOS codepage supports, Emacs
2975displays it using a sequence of @acronym{ASCII} characters. For example, if the
2976current codepage doesn't have a glyph for the letter @samp{@`o} (small
2977@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
2978the braces serve as a visual indication that this is a single character.
2979(This may look awkward for some non-Latin characters, such as those from
2980Greek or Hebrew alphabets, but it is still readable by a person who
2981knows the language.) Even though the character may occupy several
2982columns on the screen, it is really still just a single character, and
2983all Emacs commands treat it as one.
2984
2985@cindex IBM graphics characters (MS-DOS)
2986@cindex box-drawing characters (MS-DOS)
2987@cindex line-drawing characters (MS-DOS)
2988 Not all characters in DOS codepages correspond to ISO 8859
2989characters---some are used for other purposes, such as box-drawing
2990characters and other graphics. Emacs maps these characters to two
2991special character sets called @code{eight-bit-control} and
2992@code{eight-bit-graphic}, and displays them as their IBM glyphs.
2993However, you should be aware that other systems might display these
2994characters differently, so you should avoid them in text that might be
2995copied to a different operating system, or even to another DOS machine
2996that uses a different codepage.
2997
2998@vindex dos-unsupported-character-glyph
2999 Emacs supports many other characters sets aside from ISO 8859, but it
3000cannot display them on MS-DOS. So if one of these multibyte characters
3001appears in a buffer, Emacs on MS-DOS displays them as specified by the
3002@code{dos-unsupported-character-glyph} variable; by default, this glyph
3003is an empty triangle. Use the @kbd{C-u C-x =} command to display the
3004actual code and character set of such characters. @xref{Position
3005Info,,,emacs, the Emacs Manual}.
3006
3007@findex codepage-setup
3008 By default, Emacs defines a coding system to support the current
3009codepage. To define a coding system for some other codepage (e.g., to
3010visit a file written on a DOS machine in another country), use the
3011@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
3012the codepage, with completion, then creates the coding system for the
3013specified codepage. You can then use the new coding system to read and
3014write files, but you must specify it explicitly for the file command
3015when you want to use it (@pxref{Text Coding,,,emacs, the Emacs Manual}).
3016
3017 These coding systems are also useful for visiting a file encoded using
3018a DOS codepage, using Emacs running on some other operating system.
3019
3020@cindex MS-Windows codepages
3021 MS-Windows provides its own codepages, which are different from the
3022DOS codepages for the same locale. For example, DOS codepage 850
3023supports the same character set as Windows codepage 1252; DOS codepage
3024855 supports the same character set as Windows codepage 1251, etc.
3025The MS-Windows version of Emacs uses the current codepage for display
3026when invoked with the @samp{-nw} option. Support for codepages in the
3027Windows port of Emacs is part of the @file{code-pages.el} package.
3028
3029@node MS-DOS Processes
3030@section Subprocesses on MS-DOS
3031
3032@cindex compilation under MS-DOS
3033@cindex inferior processes under MS-DOS
3034@findex compile @r{(MS-DOS)}
3035@findex grep @r{(MS-DOS)}
3036 Because MS-DOS is a single-process ``operating system,''
3037asynchronous subprocesses are not available. In particular, Shell
3038mode and its variants do not work. Most Emacs features that use
3039asynchronous subprocesses also don't work on MS-DOS, including
3040Shell mode and GUD. When in doubt, try and see; commands that
3041don't work output an error message saying that asynchronous processes
3042aren't supported.
3043
3044 Compilation under Emacs with @kbd{M-x compile}, searching files with
3045@kbd{M-x grep} and displaying differences between files with @kbd{M-x
3046diff} do work, by running the inferior processes synchronously. This
3047means you cannot do any more editing until the inferior process
3048finishes.
3049
3050 Spell checking also works, by means of special support for synchronous
3051invocation of the @code{ispell} program. This is slower than the
3052asynchronous invocation on other platforms
3053
3054 Instead of the Shell mode, which doesn't work on MS-DOS, you can use
3055the @kbd{M-x eshell} command. This invokes the Eshell package that
3056implements a Posix-like shell entirely in Emacs Lisp.
3057
3058 By contrast, Emacs compiled as a native Windows application
3059@strong{does} support asynchronous subprocesses. @xref{Windows
3060Processes,,,emacs, the Emacs Manual}.
3061
3062@cindex printing under MS-DOS
3063 Printing commands, such as @code{lpr-buffer}
3064(@pxref{Printing,,,emacs, the Emacs Manual}) and
3065@code{ps-print-buffer} (@pxref{PostScript,,,emacs, the Emacs Manual}),
3066work in MS-DOS by sending the output to one of the printer ports.
3067@xref{MS-DOS Printing,,,emacs, the Emacs Manual}.
3068
3069 When you run a subprocess synchronously on MS-DOS, make sure the
3070program terminates and does not try to read keyboard input. If the
3071program does not terminate on its own, you will be unable to terminate
3072it, because MS-DOS provides no general way to terminate a process.
3073Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
3074cases.
3075
3076 Accessing files on other machines is not supported on MS-DOS. Other
3077network-oriented commands such as sending mail, Web browsing, remote
3078login, etc., don't work either, unless network access is built into
3079MS-DOS with some network redirector.
3080
3081@cindex directory listing on MS-DOS
3082@vindex dired-listing-switches @r{(MS-DOS)}
3083 Dired on MS-DOS uses the @code{ls-lisp} package where other
3084platforms use the system @code{ls} command. Therefore, Dired on
3085MS-DOS supports only some of the possible options you can mention in
3086the @code{dired-listing-switches} variable. The options that work are
3087@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
3088@samp{-s}, @samp{-t}, and @samp{-u}.
3089
3090
2409@node Index 3091@node Index
2410@unnumbered Index 3092@unnumbered Index
2411 3093
diff --git a/man/emacs.texi b/man/emacs.texi
index 44a718c9911..0dc04945e9f 100644
--- a/man/emacs.texi
+++ b/man/emacs.texi
@@ -127,7 +127,7 @@ and Sending Mail and Registers and Minibuffer.
127* Glossary:: The glossary. 127* Glossary:: The glossary.
128* Antinews:: Information about Emacs version 21. 128* Antinews:: Information about Emacs version 21.
129* Mac OS:: Using Emacs in the Mac. 129* Mac OS:: Using Emacs in the Mac.
130* MS-DOS:: Using Emacs on MS-DOS and Microsoft Windows. 130* Emacs and Microsoft Windows:: Using Emacs on Microsoft Windows.
131* Manifesto:: What's GNU? Gnu's Not Unix! 131* Manifesto:: What's GNU? Gnu's Not Unix!
132* Acknowledgments:: Major contributors to GNU Emacs. 132* Acknowledgments:: Major contributors to GNU Emacs.
133 133
@@ -860,16 +860,9 @@ Emacs and Mac OS
860* Mac Font Specs:: Specifying fonts on Mac. 860* Mac Font Specs:: Specifying fonts on Mac.
861* Mac Functions:: Mac-specific Lisp functions. 861* Mac Functions:: Mac-specific Lisp functions.
862 862
863MS-DOS and Windows 95/98/NT 863Emacs and Microsoft Windows
864 864
865* MS-DOS Keyboard:: Keyboard usage on MS-DOS.
866* MS-DOS Mouse:: Mouse usage on MS-DOS.
867* MS-DOS Display:: Fonts, frames and display size on MS-DOS.
868* MS-DOS File Names:: File-name conventions on MS-DOS.
869* Text and Binary:: Text files on MS-DOS use CRLF to separate lines. 865* Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
870* MS-DOS Printing:: How to specify the printer on MS-DOS.
871* MS-DOS and MULE:: Support for internationalization on MS-DOS.
872* MS-DOS Processes:: Running subprocesses on MS-DOS.
873* Windows Processes:: Running subprocesses on Windows. 866* Windows Processes:: Running subprocesses on Windows.
874* Windows System Menu:: Controlling what the ALT key does. 867* Windows System Menu:: Controlling what the ALT key does.
875@end menu 868@end menu
@@ -931,10 +924,10 @@ This edition of the manual is intended for use with GNU Emacs
931installed on GNU and Unix systems. GNU Emacs can also be used on VMS, 924installed on GNU and Unix systems. GNU Emacs can also be used on VMS,
932MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems. 925MS-DOS (also called MS-DOG), Microsoft Windows, and Macintosh systems.
933Those systems use different file name syntax; in addition, VMS and 926Those systems use different file name syntax; in addition, VMS and
934MS-DOS do not support all GNU Emacs features. @xref{MS-DOS}, for 927MS-DOS do not support all GNU Emacs features. @xref{Emacs and
935information about using Emacs on MS-DOS and Windows. @xref{Mac OS}, 928Microsoft Windows}, for information about using Emacs on Windows.
936for information about using Emacs on Macintosh. We don't try to 929@xref{Mac OS}, for information about using Emacs on Macintosh. We
937describe VMS usage in this manual. 930don't try to describe VMS usage in this manual.
938@end iftex 931@end iftex
939 932
940@node Distrib, Intro, Top, Top 933@node Distrib, Intro, Top, Top
diff --git a/man/frames.texi b/man/frames.texi
index b5ec21533b7..c11d6f74685 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -27,7 +27,7 @@ it terminates all the frames. To delete just one frame, use @kbd{C-x 5
27 27
28 Emacs compiled for MS-DOS emulates some windowing functionality, 28 Emacs compiled for MS-DOS emulates some windowing functionality,
29so that you can use many of the features described in this chapter. 29so that you can use many of the features described in this chapter.
30@xref{MS-DOS Mouse}, for more information. 30@xref{MS-DOS Mouse,,,emacs-xtra,Specialized Emacs Features}.
31 31
32@menu 32@menu
33* Mouse Commands:: Moving, cutting, and pasting, with the mouse. 33* Mouse Commands:: Moving, cutting, and pasting, with the mouse.
diff --git a/man/gnu.texi b/man/gnu.texi
index c2652d09a7b..6b050d7839a 100644
--- a/man/gnu.texi
+++ b/man/gnu.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1995, 2002, 2003, 2004,
3@c 2005, 2006 Free Software Foundation, Inc. 3@c 2005, 2006 Free Software Foundation, Inc.
4@ifclear justgnu 4@ifclear justgnu
5@node Manifesto,, MS-DOS, Top 5@node Manifesto,, Emacs and Microsoft Windows, Top
6@unnumbered The GNU Manifesto 6@unnumbered The GNU Manifesto
7@end ifclear 7@end ifclear
8@ifset justgnu 8@ifset justgnu
diff --git a/man/macos.texi b/man/macos.texi
index ba0f9e995ca..89ce13d1d1b 100644
--- a/man/macos.texi
+++ b/man/macos.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 2000, 2001, 2002, 2003, 2004, 2@c Copyright (C) 2000, 2001, 2002, 2003, 2004,
3@c 2005, 2006 Free Software Foundation, Inc. 3@c 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Mac OS, MS-DOS, Antinews, Top 5@node Mac OS, Emacs and Microsoft Windows, Antinews, Top
6@appendix Emacs and Mac OS 6@appendix Emacs and Mac OS
7@cindex Mac OS 7@cindex Mac OS
8@cindex Macintosh 8@cindex Macintosh
diff --git a/man/msdog.texi b/man/msdog.texi
index 434427b49b4..3bdc9051a71 100644
--- a/man/msdog.texi
+++ b/man/msdog.texi
@@ -2,307 +2,28 @@
2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001, 2@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
3@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 3@c 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node MS-DOS, Manifesto, Mac OS, Top 5@node Emacs and Microsoft Windows, Manifesto, Mac OS, Top
6@appendix Emacs and Microsoft Systems 6@appendix Emacs and Microsoft Windows
7@cindex MS-DOG
8@cindex Microsoft Windows 7@cindex Microsoft Windows
9@cindex MS-DOS peculiarities 8
10 9 This section describes peculiarities of using Emacs on Microsoft
11 This section briefly describes the peculiarities of using Emacs on 10Windows. Information about Emacs and Microsoft's older MS-DOS
12the MS-DOS ``operating system'' (also known as ``MS-DOG'') and on 11``operating system'' (also known as ``MS-DOG'') is now in a separate
13Microsoft Windows. 12manual (@inforef{MS-DOG,, emacs-xtra}).
14 13
15 If you build Emacs for MS-DOS, the binary will also run on Windows 14 Iif you want to use Emacs on Windows, you would normally build Emacs
163.X, Windows NT, Windows 9X/ME, Windows 2000, or OS/2 as a DOS 15specifically for Windows. If you do that, the behavior is reasonably
17application; all the of this chapter applies for all of those systems, 16similar to what is documented in the rest of the manual, including
18if you use an Emacs that was built for MS-DOS. 17support for long file names, multiple frames, scroll bars, mouse
19 18menus, and subprocesses. However, a few special considerations apply,
20 However, if you want to use Emacs on Windows, you would normally 19and they are described here.
21build Emacs specifically for Windows. If you do that, most of this
22chapter does not apply; instead, you get behavior much closer to what
23is documented in the rest of the manual, including support for long
24file names, multiple frames, scroll bars, mouse menus, and
25subprocesses. However, the section on text files and binary files
26does still apply. There are also two sections at the end of this
27chapter which apply specifically for the Windows version.
28 20
29@menu 21@menu
30* Keyboard: MS-DOS Keyboard. Keyboard conventions on MS-DOS. 22* Text and Binary:: Text files use CRLF to terminate lines.
31* Mouse: MS-DOS Mouse. Mouse conventions on MS-DOS.
32* Display: MS-DOS Display. Fonts, frames and display size on MS-DOS.
33* Files: MS-DOS File Names. File name conventions on MS-DOS.
34* Text and Binary:: Text files on MS-DOS use CRLF to separate lines.
35* Printing: MS-DOS Printing. How to specify the printer on MS-DOS.
36* I18N: MS-DOS and MULE. Support for internationalization on MS-DOS.
37* Processes: MS-DOS Processes. Running subprocesses on MS-DOS.
38* Windows Processes:: Running subprocesses on Windows. 23* Windows Processes:: Running subprocesses on Windows.
39* Windows System Menu:: Controlling what the ALT key does. 24* Windows System Menu:: Controlling what the ALT key does.
40@end menu 25@end menu
41 26
42@node MS-DOS Keyboard
43@section Keyboard Usage on MS-DOS
44
45@kindex DEL @r{(MS-DOS)}
46@kindex BS @r{(MS-DOS)}
47 The key that is called @key{DEL} in Emacs (because that's how it is
48designated on most workstations) is known as @key{BS} (backspace) on a
49PC. That is why the PC-specific terminal initialization remaps the
50@key{BS} key to act as @key{DEL}; the @key{DELETE} key is remapped to act
51as @kbd{C-d} for the same reasons.
52
53@kindex C-g @r{(MS-DOS)}
54@kindex C-BREAK @r{(MS-DOS)}
55@cindex quitting on MS-DOS
56 Emacs built for MS-DOS recognizes @kbd{C-@key{BREAK}} as a quit
57character, just like @kbd{C-g}. This is because Emacs cannot detect
58that you have typed @kbd{C-g} until it is ready for more input. As a
59consequence, you cannot use @kbd{C-g} to stop a running command
60(@pxref{Quitting}). By contrast, @kbd{C-@key{BREAK}} @emph{is} detected
61as soon as you type it (as @kbd{C-g} is on other systems), so it can be
62used to stop a running command and for emergency escape
63(@pxref{Emergency Escape}).
64
65@cindex Meta (under MS-DOS)
66@cindex Hyper (under MS-DOS)
67@cindex Super (under MS-DOS)
68@vindex dos-super-key
69@vindex dos-hyper-key
70 The PC keyboard maps use the left @key{ALT} key as the @key{META} key.
71You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
72choose either the right @key{CTRL} key or the right @key{ALT} key by
73setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
74or 2 respectively. If neither @code{dos-super-key} nor
75@code{dos-hyper-key} is 1, then by default the right @key{ALT} key is
76also mapped to the @key{META} key. However, if the MS-DOS international
77keyboard support program @file{KEYB.COM} is installed, Emacs will
78@emph{not} map the right @key{ALT} to @key{META}, since it is used for
79accessing characters like @kbd{~} and @kbd{@@} on non-US keyboard
80layouts; in this case, you may only use the left @key{ALT} as @key{META}
81key.
82
83@kindex C-j @r{(MS-DOS)}
84@vindex dos-keypad-mode
85 The variable @code{dos-keypad-mode} is a flag variable that controls
86what key codes are returned by keys in the numeric keypad. You can also
87define the keypad @key{ENTER} key to act like @kbd{C-j}, by putting the
88following line into your @file{_emacs} file:
89
90@smallexample
91;; @r{Make the @key{ENTER} key from the numeric keypad act as @kbd{C-j}.}
92(define-key function-key-map [kp-enter] [?\C-j])
93@end smallexample
94
95@node MS-DOS Mouse
96@section Mouse Usage on MS-DOS
97
98@cindex mouse support under MS-DOS
99 Emacs on MS-DOS supports a mouse (on the default terminal only).
100The mouse commands work as documented, including those that use menus
101and the menu bar (@pxref{Menu Bar}). Scroll bars don't work in
102MS-DOS Emacs. PC mice usually have only two buttons; these act as
103@kbd{Mouse-1} and @kbd{Mouse-2}, but if you press both of them
104together, that has the effect of @kbd{Mouse-3}. If the mouse does have
1053 buttons, Emacs detects that at startup, and all the 3 buttons function
106normally, as on X.
107
108 Help strings for menu-bar and pop-up menus are displayed in the echo
109area when the mouse pointer moves across the menu items.
110Highlighting of mouse-sensitive text (@pxref{Mouse References}) is also
111supported.
112
113@cindex mouse, set number of buttons
114@findex msdos-set-mouse-buttons
115 Some versions of mouse drivers don't report the number of mouse
116buttons correctly. For example, mice with a wheel report that they
117have 3 buttons, but only 2 of them are passed to Emacs; the clicks on
118the wheel, which serves as the middle button, are not passed. In
119these cases, you can use the @kbd{M-x msdos-set-mouse-buttons} command
120to tell Emacs how many mouse buttons to expect. You could make such a
121setting permanent by adding this fragment to your @file{_emacs} init
122file:
123
124@example
125;; @r{Treat the mouse like a 2-button mouse.}
126(msdos-set-mouse-buttons 2)
127@end example
128
129@cindex Windows clipboard support
130 Emacs built for MS-DOS supports clipboard operations when it runs on
131Windows. Commands that put text on the kill ring, or yank text from the
132ring, check the Windows clipboard first, just as Emacs does on the X
133Window System (@pxref{Mouse Commands}). Only the primary selection and
134the cut buffer are supported by MS-DOS Emacs on Windows; the secondary
135selection always appears as empty.
136
137 Due to the way clipboard access is implemented by Windows, the
138length of text you can put into the clipboard is limited by the amount
139of free DOS memory that is available to Emacs. Usually, up to 620KB of
140text can be put into the clipboard, but this limit depends on the system
141configuration and is lower if you run Emacs as a subprocess of
142another program. If the killed text does not fit, Emacs outputs a
143message saying so, and does not put the text into the clipboard.
144
145 Null characters also cannot be put into the Windows clipboard. If the
146killed text includes null characters, Emacs does not put such text into
147the clipboard, and displays in the echo area a message to that effect.
148
149@vindex dos-display-scancodes
150 The variable @code{dos-display-scancodes}, when non-@code{nil},
151directs Emacs to display the @acronym{ASCII} value and the keyboard scan code of
152each keystroke; this feature serves as a complement to the
153@code{view-lossage} command, for debugging.
154
155@node MS-DOS Display
156@section Display on MS-DOS
157@cindex faces under MS-DOS
158@cindex fonts, emulating under MS-DOS
159
160 Display on MS-DOS cannot use font variants, like bold or italic,
161but it does support
162multiple faces, each of which can specify a foreground and a background
163color. Therefore, you can get the full functionality of Emacs packages
164that use fonts (such as @code{font-lock}, Enriched Text mode, and
165others) by defining the relevant faces to use different colors. Use the
166@code{list-colors-display} command (@pxref{Frame Parameters}) and the
167@code{list-faces-display} command (@pxref{Faces}) to see what colors and
168faces are available and what they look like.
169
170 @xref{MS-DOS and MULE}, later in this chapter, for information on
171how Emacs displays glyphs and characters that aren't supported by the
172native font built into the DOS display.
173
174@cindex cursor shape on MS-DOS
175 When Emacs starts, it changes the cursor shape to a solid box. This
176is for compatibility with other systems, where the box cursor is the
177default in Emacs. This default shape can be changed to a bar by
178specifying the @code{cursor-type} parameter in the variable
179@code{default-frame-alist} (@pxref{Creating Frames}). The MS-DOS
180terminal doesn't support a vertical-bar cursor, so the bar cursor is
181horizontal, and the @code{@var{width}} parameter, if specified by the
182frame parameters, actually determines its height. For this reason,
183the @code{bar} and @code{hbar} cursor types produce the same effect on
184MS-DOS. As an extension, the bar cursor specification can include the
185starting scan line of the cursor as well as its width, like this:
186
187@example
188 '(cursor-type bar @var{width} . @var{start})
189@end example
190
191@noindent
192In addition, if the @var{width} parameter is negative, the cursor bar
193begins at the top of the character cell.
194
195@cindex frames on MS-DOS
196 The MS-DOS terminal can only display a single frame at a time. The
197Emacs frame facilities work on MS-DOS much as they do on text-only
198terminals (@pxref{Frames}). When you run Emacs from a DOS window on
199MS-Windows, you can make the visible frame smaller than the full
200screen, but Emacs still cannot display more than a single frame at a
201time.
202
203@cindex frame size under MS-DOS
204@findex mode4350
205@findex mode25
206 The @code{mode4350} command switches the display to 43 or 50
207lines, depending on your hardware; the @code{mode25} command switches
208to the default 80x25 screen size.
209
210 By default, Emacs only knows how to set screen sizes of 80 columns by
21125, 28, 35, 40, 43 or 50 rows. However, if your video adapter has
212special video modes that will switch the display to other sizes, you can
213have Emacs support those too. When you ask Emacs to switch the frame to
214@var{n} rows by @var{m} columns dimensions, it checks if there is a
215variable called @code{screen-dimensions-@var{n}x@var{m}}, and if so,
216uses its value (which must be an integer) as the video mode to switch
217to. (Emacs switches to that video mode by calling the BIOS @code{Set
218Video Mode} function with the value of
219@code{screen-dimensions-@var{n}x@var{m}} in the @code{AL} register.)
220For example, suppose your adapter will switch to 66x80 dimensions when
221put into video mode 85. Then you can make Emacs support this screen
222size by putting the following into your @file{_emacs} file:
223
224@example
225(setq screen-dimensions-66x80 85)
226@end example
227
228 Since Emacs on MS-DOS can only set the frame size to specific
229supported dimensions, it cannot honor every possible frame resizing
230request. When an unsupported size is requested, Emacs chooses the next
231larger supported size beyond the specified size. For example, if you
232ask for 36x80 frame, you will get 40x80 instead.
233
234 The variables @code{screen-dimensions-@var{n}x@var{m}} are used only
235when they exactly match the specified size; the search for the next
236larger supported size ignores them. In the above example, even if your
237VGA supports 38x80 dimensions and you define a variable
238@code{screen-dimensions-38x80} with a suitable value, you will still get
23940x80 screen when you ask for a 36x80 frame. If you want to get the
24038x80 size in this case, you can do it by setting the variable named
241@code{screen-dimensions-36x80} with the same video mode value as
242@code{screen-dimensions-38x80}.
243
244 Changing frame dimensions on MS-DOS has the effect of changing all the
245other frames to the new dimensions.
246
247@node MS-DOS File Names
248@section File Names on MS-DOS
249@cindex file names under MS-DOS
250@cindex init file, default name under MS-DOS
251
252 MS-DOS normally uses a backslash, @samp{\}, to separate name units
253within a file name, instead of the slash used on other systems. Emacs
254on MS-DOS permits use of either slash or backslash, and also knows
255about drive letters in file names.
256
257 On MS-DOS, file names are case-insensitive and limited to eight
258characters, plus optionally a period and three more characters. Emacs
259knows enough about these limitations to handle file names that were
260meant for other operating systems. For instance, leading dots @samp{.}
261in file names are invalid in MS-DOS, so Emacs transparently converts
262them to underscores @samp{_}; thus your default init file (@pxref{Init
263File}) is called @file{_emacs} on MS-DOS. Excess characters before or
264after the period are generally ignored by MS-DOS itself; thus, if you
265visit the file @file{LongFileName.EvenLongerExtension}, you will
266silently get @file{longfile.eve}, but Emacs will still display the long
267file name on the mode line. Other than that, it's up to you to specify
268file names which are valid under MS-DOS; the transparent conversion as
269described above only works on file names built into Emacs.
270
271@cindex backup file names on MS-DOS
272 The above restrictions on the file names on MS-DOS make it almost
273impossible to construct the name of a backup file (@pxref{Backup
274Names}) without losing some of the original file name characters. For
275example, the name of a backup file for @file{docs.txt} is
276@file{docs.tx~} even if single backup is used.
277
278@cindex file names under Windows 95/NT
279@cindex long file names in DOS box under Windows 95/NT
280 If you run Emacs as a DOS application under Windows 9X, Windows ME, or
281Windows 2000, you can turn on support for long file names. If you do
282that, Emacs doesn't truncate file names or convert them to lower case;
283instead, it uses the file names that you specify, verbatim. To enable
284long file name support, set the environment variable @env{LFN} to
285@samp{y} before starting Emacs. Unfortunately, Windows NT doesn't allow
286DOS programs to access long file names, so Emacs built for MS-DOS will
287only see their short 8+3 aliases.
288
289@cindex @env{HOME} directory under MS-DOS
290 MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
291that the directory where it is installed is the value of the @env{HOME}
292environment variable. That is, if your Emacs binary,
293@file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
294Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}. In
295particular, that is where Emacs looks for the init file @file{_emacs}.
296With this in mind, you can use @samp{~} in file names as an alias for
297the home directory, as you would on GNU or Unix. You can also set
298@env{HOME} variable in the environment before starting Emacs; its
299value will then override the above default behavior.
300
301 Emacs on MS-DOS handles the directory name @file{/dev} specially,
302because of a feature in the emulator libraries of DJGPP that pretends
303I/O devices have names in that directory. We recommend that you avoid
304using an actual directory named @file{/dev} on any disk.
305
306@node Text and Binary 27@node Text and Binary
307@section Text Files and Binary Files 28@section Text Files and Binary Files
308@cindex text and binary files on MS-DOS/MS-Windows 29@cindex text and binary files on MS-DOS/MS-Windows
@@ -419,379 +140,6 @@ always writes those files with DOS-style EOLs.
419the file-name patterns in @code{file-name-buffer-file-type-alist}, the 140the file-name patterns in @code{file-name-buffer-file-type-alist}, the
420EOL conversion is determined by @code{file-name-buffer-file-type-alist}. 141EOL conversion is determined by @code{file-name-buffer-file-type-alist}.
421 142
422@node MS-DOS Printing
423@section Printing and MS-DOS
424
425 Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and
426@code{ps-print-buffer} (@pxref{PostScript}) can work in MS-DOS and
427MS-Windows by sending the output to one of the printer ports, if a
428Posix-style @code{lpr} program is unavailable. The same Emacs
429variables control printing on all systems, but in some cases they have
430different default values on MS-DOS and MS-Windows.
431
432@vindex printer-name @r{(MS-DOS)}
433 If you want to use your local printer, printing on it in the usual DOS
434manner, then set the Lisp variable @code{lpr-command} to @code{""} (its
435default value) and @code{printer-name} to the name of the printer
436port---for example, @code{"PRN"}, the usual local printer port (that's
437the default), or @code{"LPT2"}, or @code{"COM1"} for a serial printer.
438You can also set @code{printer-name} to a file name, in which case
439``printed'' output is actually appended to that file. If you set
440@code{printer-name} to @code{"NUL"}, printed output is silently
441discarded (sent to the system null device).
442
443 On MS-Windows, when the Windows network software is installed, you can
444also use a printer shared by another machine by setting
445@code{printer-name} to the UNC share name for that printer---for example,
446@code{"//joes_pc/hp4si"}. (It doesn't matter whether you use forward
447slashes or backslashes here.) To find out the names of shared printers,
448run the command @samp{net view} at a DOS command prompt to obtain a list
449of servers, and @samp{net view @var{server-name}} to see the names of printers
450(and directories) shared by that server. Alternatively, click the
451@samp{Network Neighborhood} icon on your desktop, and look for machines
452which share their printers via the network.
453
454@cindex @samp{net use}, and printing on MS-Windows
455@cindex networked printers (MS-Windows)
456 If the printer doesn't appear in the output of @samp{net view}, or
457if setting @code{printer-name} to the UNC share name doesn't produce a
458hardcopy on that printer, you can use the @samp{net use} command to
459connect a local print port such as @code{"LPT2"} to the networked
460printer. For example, typing @kbd{net use LPT2:
461\\joes_pc\hp4si}@footnote{
462Note that the @samp{net use} command requires the UNC share name to be
463typed with the Windows-style backslashes, while the value of
464@code{printer-name} can be set with either forward- or backslashes.}
465causes Windows to @dfn{capture} the LPT2 port and redirect the printed
466material to the printer connected to the machine @code{joes_pc}.
467After this command, setting @code{printer-name} to @code{"LPT2"}
468should produce the hardcopy on the networked printer.
469
470 With some varieties of Windows network software, you can instruct
471Windows to capture a specific printer port such as @code{"LPT2"}, and
472redirect it to a networked printer via the @w{@code{Control
473Panel->Printers}} applet instead of @samp{net use}.
474
475 Some printers expect DOS codepage encoding of non-@acronym{ASCII} text, even
476though they are connected to a Windows machine which uses a different
477encoding for the same locale. For example, in the Latin-1 locale, DOS
478uses codepage 850 whereas Windows uses codepage 1252. @xref{MS-DOS and
479MULE}. When you print to such printers from Windows, you can use the
480@kbd{C-x RET c} (@code{universal-coding-system-argument}) command before
481@kbd{M-x lpr-buffer}; Emacs will then convert the text to the DOS
482codepage that you specify. For example, @kbd{C-x RET c cp850-dos RET
483M-x lpr-region RET} will print the region while converting it to the
484codepage 850 encoding. You may need to create the @code{cp@var{nnn}}
485coding system with @kbd{M-x codepage-setup}.
486
487 If you set @code{printer-name} to a file name, it's best to use an
488absolute file name. Emacs changes the working directory according to
489the default directory of the current buffer, so if the file name in
490@code{printer-name} is relative, you will end up with several such
491files, each one in the directory of the buffer from which the printing
492was done.
493
494@findex print-buffer @r{(MS-DOS)}
495@findex print-region @r{(MS-DOS)}
496@vindex lpr-headers-switches @r{(MS-DOS)}
497 The commands @code{print-buffer} and @code{print-region} call the
498@code{pr} program, or use special switches to the @code{lpr} program, to
499produce headers on each printed page. MS-DOS and MS-Windows don't
500normally have these programs, so by default, the variable
501@code{lpr-headers-switches} is set so that the requests to print page
502headers are silently ignored. Thus, @code{print-buffer} and
503@code{print-region} produce the same output as @code{lpr-buffer} and
504@code{lpr-region}, respectively. If you do have a suitable @code{pr}
505program (for example, from GNU Textutils), set
506@code{lpr-headers-switches} to @code{nil}; Emacs will then call
507@code{pr} to produce the page headers, and print the resulting output as
508specified by @code{printer-name}.
509
510@vindex print-region-function @r{(MS-DOS)}
511@cindex lpr usage under MS-DOS
512@vindex lpr-command @r{(MS-DOS)}
513@vindex lpr-switches @r{(MS-DOS)}
514 Finally, if you do have an @code{lpr} work-alike, you can set the
515variable @code{lpr-command} to @code{"lpr"}. Then Emacs will use
516@code{lpr} for printing, as on other systems. (If the name of the
517program isn't @code{lpr}, set @code{lpr-command} to specify where to
518find it.) The variable @code{lpr-switches} has its standard meaning
519when @code{lpr-command} is not @code{""}. If the variable
520@code{printer-name} has a string value, it is used as the value for the
521@code{-P} option to @code{lpr}, as on Unix.
522
523@findex ps-print-buffer @r{(MS-DOS)}
524@findex ps-spool-buffer @r{(MS-DOS)}
525@vindex ps-printer-name @r{(MS-DOS)}
526@vindex ps-lpr-command @r{(MS-DOS)}
527@vindex ps-lpr-switches @r{(MS-DOS)}
528 A parallel set of variables, @code{ps-lpr-command},
529@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
530Variables}), defines how PostScript files should be printed. These
531variables are used in the same way as the corresponding variables
532described above for non-PostScript printing. Thus, the value of
533@code{ps-printer-name} is used as the name of the device (or file) to
534which PostScript output is sent, just as @code{printer-name} is used for
535non-PostScript printing. (There are two distinct sets of variables in
536case you have two printers attached to two different ports, and only one
537of them is a PostScript printer.)
538
539 The default value of the variable @code{ps-lpr-command} is @code{""},
540which causes PostScript output to be sent to the printer port specified
541by @code{ps-printer-name}, but @code{ps-lpr-command} can also be set to
542the name of a program which will accept PostScript files. Thus, if you
543have a non-PostScript printer, you can set this variable to the name of
544a PostScript interpreter program (such as Ghostscript). Any switches
545that need to be passed to the interpreter program are specified using
546@code{ps-lpr-switches}. (If the value of @code{ps-printer-name} is a
547string, it will be added to the list of switches as the value for the
548@code{-P} option. This is probably only useful if you are using
549@code{lpr}, so when using an interpreter typically you would set
550@code{ps-printer-name} to something other than a string so it is
551ignored.)
552
553 For example, to use Ghostscript for printing on an Epson printer
554connected to the @samp{LPT2} port, put this in your @file{_emacs} file:
555
556@example
557(setq ps-printer-name t) ; Ghostscript doesn't understand -P
558(setq ps-lpr-command "c:/gs/gs386")
559(setq ps-lpr-switches '("-q" "-dNOPAUSE"
560 "-sDEVICE=epson"
561 "-r240x72"
562 "-sOutputFile=LPT2"
563 "-Ic:/gs"))
564@end example
565
566@noindent
567(This assumes that Ghostscript is installed in the @file{"c:/gs"}
568directory.)
569
570@vindex dos-printer
571@vindex dos-ps-printer
572 For backwards compatibility, the value of @code{dos-printer}
573(@code{dos-ps-printer}), if it has a value, overrides the value of
574@code{printer-name} (@code{ps-printer-name}), on MS-DOS and MS-Windows
575only.
576
577
578@node MS-DOS and MULE
579@section International Support on MS-DOS
580@cindex international support @r{(MS-DOS)}
581
582 Emacs on MS-DOS supports the same international character sets as it
583does on GNU, Unix and other platforms (@pxref{International}), including
584coding systems for converting between the different character sets.
585However, due to incompatibilities between MS-DOS/MS-Windows and other systems,
586there are several DOS-specific aspects of this support that you should
587be aware of. This section describes these aspects.
588
589 The description below is largely specific to the MS-DOS port of
590Emacs, especially where it talks about practical implications for
591Emacs users. For other operating systems, see the @file{code-pages.el}
592package, which implements support for MS-DOS- and MS-Windows-specific
593encodings for all platforms other than MS-DOS.
594
595@table @kbd
596@item M-x dos-codepage-setup
597Set up Emacs display and coding systems as appropriate for the current
598DOS codepage.
599
600@item M-x codepage-setup
601Create a coding system for a certain DOS codepage.
602@end table
603
604@cindex codepage, MS-DOS
605@cindex DOS codepages
606 MS-DOS is designed to support one character set of 256 characters at
607any given time, but gives you a variety of character sets to choose
608from. The alternative character sets are known as @dfn{DOS codepages}.
609Each codepage includes all 128 @acronym{ASCII} characters, but the other 128
610characters (codes 128 through 255) vary from one codepage to another.
611Each DOS codepage is identified by a 3-digit number, such as 850, 862,
612etc.
613
614 In contrast to X, which lets you use several fonts at the same time,
615MS-DOS normally doesn't allow use of several codepages in a single
616session. MS-DOS was designed to load a single codepage at system
617startup, and require you to reboot in order to change
618it@footnote{Normally, one particular codepage is burnt into the
619display memory, while other codepages can be installed by modifying
620system configuration files, such as @file{CONFIG.SYS}, and rebooting.
621While there is third-party software that allows changing the codepage
622without rebooting, we describe here how a stock MS-DOS system
623behaves.}. Much the same limitation applies when you run DOS
624executables on other systems such as MS-Windows.
625
626@cindex unibyte operation @r{(MS-DOS)}
627 If you invoke Emacs on MS-DOS with the @samp{--unibyte} option
628(@pxref{Initial Options}), Emacs does not perform any conversion of
629non-@acronym{ASCII} characters. Instead, it reads and writes any non-@acronym{ASCII}
630characters verbatim, and sends their 8-bit codes to the display
631verbatim. Thus, unibyte Emacs on MS-DOS supports the current codepage,
632whatever it may be, but cannot even represent any other characters.
633
634@vindex dos-codepage
635 For multibyte operation on MS-DOS, Emacs needs to know which
636characters the chosen DOS codepage can display. So it queries the
637system shortly after startup to get the chosen codepage number, and
638stores the number in the variable @code{dos-codepage}. Some systems
639return the default value 437 for the current codepage, even though the
640actual codepage is different. (This typically happens when you use the
641codepage built into the display hardware.) You can specify a different
642codepage for Emacs to use by setting the variable @code{dos-codepage} in
643your init file.
644
645@cindex language environment, automatic selection on @r{MS-DOS}
646 Multibyte Emacs supports only certain DOS codepages: those which can
647display Far-Eastern scripts, like the Japanese codepage 932, and those
648that encode a single ISO 8859 character set.
649
650 The Far-Eastern codepages can directly display one of the MULE
651character sets for these countries, so Emacs simply sets up to use the
652appropriate terminal coding system that is supported by the codepage.
653The special features described in the rest of this section mostly
654pertain to codepages that encode ISO 8859 character sets.
655
656 For the codepages which correspond to one of the ISO character sets,
657Emacs knows the character set name based on the codepage number. Emacs
658automatically creates a coding system to support reading and writing
659files that use the current codepage, and uses this coding system by
660default. The name of this coding system is @code{cp@var{nnn}}, where
661@var{nnn} is the codepage number.@footnote{The standard Emacs coding
662systems for ISO 8859 are not quite right for the purpose, because
663typically the DOS codepage does not match the standard ISO character
664codes. For example, the letter @samp{@,{c}} (@samp{c} with cedilla) has
665code 231 in the standard Latin-1 character set, but the corresponding
666DOS codepage 850 uses code 135 for this glyph.}
667
668@cindex mode line @r{(MS-DOS)}
669 All the @code{cp@var{nnn}} coding systems use the letter @samp{D} (for
670``DOS'') as their mode-line mnemonic. Since both the terminal coding
671system and the default coding system for file I/O are set to the proper
672@code{cp@var{nnn}} coding system at startup, it is normal for the mode
673line on MS-DOS to begin with @samp{-DD\-}. @xref{Mode Line}.
674Far-Eastern DOS terminals do not use the @code{cp@var{nnn}} coding
675systems, and thus their initial mode line looks like the Emacs default.
676
677 Since the codepage number also indicates which script you are using,
678Emacs automatically runs @code{set-language-environment} to select the
679language environment for that script (@pxref{Language Environments}).
680
681 If a buffer contains a character belonging to some other ISO 8859
682character set, not the one that the chosen DOS codepage supports, Emacs
683displays it using a sequence of @acronym{ASCII} characters. For example, if the
684current codepage doesn't have a glyph for the letter @samp{@`o} (small
685@samp{o} with a grave accent), it is displayed as @samp{@{`o@}}, where
686the braces serve as a visual indication that this is a single character.
687(This may look awkward for some non-Latin characters, such as those from
688Greek or Hebrew alphabets, but it is still readable by a person who
689knows the language.) Even though the character may occupy several
690columns on the screen, it is really still just a single character, and
691all Emacs commands treat it as one.
692
693@cindex IBM graphics characters (MS-DOS)
694@cindex box-drawing characters (MS-DOS)
695@cindex line-drawing characters (MS-DOS)
696 Not all characters in DOS codepages correspond to ISO 8859
697characters---some are used for other purposes, such as box-drawing
698characters and other graphics. Emacs maps these characters to two
699special character sets called @code{eight-bit-control} and
700@code{eight-bit-graphic}, and displays them as their IBM glyphs.
701However, you should be aware that other systems might display these
702characters differently, so you should avoid them in text that might be
703copied to a different operating system, or even to another DOS machine
704that uses a different codepage.
705
706@vindex dos-unsupported-character-glyph
707 Emacs supports many other characters sets aside from ISO 8859, but it
708cannot display them on MS-DOS. So if one of these multibyte characters
709appears in a buffer, Emacs on MS-DOS displays them as specified by the
710@code{dos-unsupported-character-glyph} variable; by default, this glyph
711is an empty triangle. Use the @kbd{C-u C-x =} command to display the
712actual code and character set of such characters. @xref{Position Info}.
713
714@findex codepage-setup
715 By default, Emacs defines a coding system to support the current
716codepage. To define a coding system for some other codepage (e.g., to
717visit a file written on a DOS machine in another country), use the
718@kbd{M-x codepage-setup} command. It prompts for the 3-digit code of
719the codepage, with completion, then creates the coding system for the
720specified codepage. You can then use the new coding system to read and
721write files, but you must specify it explicitly for the file command
722when you want to use it (@pxref{Text Coding}).
723
724 These coding systems are also useful for visiting a file encoded using
725a DOS codepage, using Emacs running on some other operating system.
726
727@cindex MS-Windows codepages
728 MS-Windows provides its own codepages, which are different from the
729DOS codepages for the same locale. For example, DOS codepage 850
730supports the same character set as Windows codepage 1252; DOS codepage
731855 supports the same character set as Windows codepage 1251, etc.
732The MS-Windows version of Emacs uses the current codepage for display
733when invoked with the @samp{-nw} option. Support for codepages in the
734Windows port of Emacs is part of the @file{code-pages.el} package.
735
736@node MS-DOS Processes
737@section Subprocesses on MS-DOS
738
739@cindex compilation under MS-DOS
740@cindex inferior processes under MS-DOS
741@findex compile @r{(MS-DOS)}
742@findex grep @r{(MS-DOS)}
743 Because MS-DOS is a single-process ``operating system,''
744asynchronous subprocesses are not available. In particular, Shell
745mode and its variants do not work. Most Emacs features that use
746asynchronous subprocesses also don't work on MS-DOS, including
747Shell mode and GUD. When in doubt, try and see; commands that
748don't work output an error message saying that asynchronous processes
749aren't supported.
750
751 Compilation under Emacs with @kbd{M-x compile}, searching files with
752@kbd{M-x grep} and displaying differences between files with @kbd{M-x
753diff} do work, by running the inferior processes synchronously. This
754means you cannot do any more editing until the inferior process
755finishes.
756
757 Spell checking also works, by means of special support for synchronous
758invocation of the @code{ispell} program. This is slower than the
759asynchronous invocation on other platforms
760
761 Instead of the Shell mode, which doesn't work on MS-DOS, you can use
762the @kbd{M-x eshell} command. This invokes the Eshell package that
763implements a Posix-like shell entirely in Emacs Lisp.
764
765 By contrast, Emacs compiled as a native Windows application
766@strong{does} support asynchronous subprocesses. @xref{Windows
767Processes}.
768
769@cindex printing under MS-DOS
770 Printing commands, such as @code{lpr-buffer} (@pxref{Printing}) and
771@code{ps-print-buffer} (@pxref{PostScript}), work in MS-DOS by sending
772the output to one of the printer ports. @xref{MS-DOS Printing}.
773
774 When you run a subprocess synchronously on MS-DOS, make sure the
775program terminates and does not try to read keyboard input. If the
776program does not terminate on its own, you will be unable to terminate
777it, because MS-DOS provides no general way to terminate a process.
778Pressing @kbd{C-c} or @kbd{C-@key{BREAK}} might sometimes help in these
779cases.
780
781 Accessing files on other machines is not supported on MS-DOS. Other
782network-oriented commands such as sending mail, Web browsing, remote
783login, etc., don't work either, unless network access is built into
784MS-DOS with some network redirector.
785
786@cindex directory listing on MS-DOS
787@vindex dired-listing-switches @r{(MS-DOS)}
788 Dired on MS-DOS uses the @code{ls-lisp} package where other
789platforms use the system @code{ls} command. Therefore, Dired on
790MS-DOS supports only some of the possible options you can mention in
791the @code{dired-listing-switches} variable. The options that work are
792@samp{-A}, @samp{-a}, @samp{-c}, @samp{-i}, @samp{-r}, @samp{-S},
793@samp{-s}, @samp{-t}, and @samp{-u}.
794
795@node Windows Processes 143@node Windows Processes
796@section Subprocesses on Windows 9X/ME and Windows NT/2K 144@section Subprocesses on Windows 9X/ME and Windows NT/2K
797 145
diff --git a/man/mule.texi b/man/mule.texi
index 4b63fb90d4e..91c5aaaf47e 100644
--- a/man/mule.texi
+++ b/man/mule.texi
@@ -605,7 +605,7 @@ system; for example, to visit a file encoded in codepage 850, type
605@key{RET}}@footnote{ 605@key{RET}}@footnote{
606In the MS-DOS port of Emacs, you need to create a @code{cp@var{nnn}} 606In the MS-DOS port of Emacs, you need to create a @code{cp@var{nnn}}
607coding system with @kbd{M-x codepage-setup}, before you can use it. 607coding system with @kbd{M-x codepage-setup}, before you can use it.
608@xref{MS-DOS and MULE}.}. 608@xref{MS-DOS and MULE,,,emacs-extra,Specialized Emacs Features}.}.
609 609
610 In addition to converting various representations of non-@acronym{ASCII} 610 In addition to converting various representations of non-@acronym{ASCII}
611characters, a coding system can perform end-of-line conversion. Emacs 611characters, a coding system can perform end-of-line conversion. Emacs
diff --git a/man/trouble.texi b/man/trouble.texi
index 6298e24805a..f44862598c4 100644
--- a/man/trouble.texi
+++ b/man/trouble.texi
@@ -58,7 +58,8 @@ Search}).
58like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to 58like @kbd{C-g}. The reason is that it is not feasible, on MS-DOS, to
59recognize @kbd{C-g} while a command is running, between interactions 59recognize @kbd{C-g} while a command is running, between interactions
60with the user. By contrast, it @emph{is} feasible to recognize 60with the user. By contrast, it @emph{is} feasible to recognize
61@kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard}. 61@kbd{C-@key{BREAK}} at all times. @xref{MS-DOS Keyboard,,,emacs-xtra,
62Specialized Emacs Features}.
62 63
63@findex keyboard-quit 64@findex keyboard-quit
64 @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t} 65 @kbd{C-g} works by setting the variable @code{quit-flag} to @code{t}