Remove string.h hack.
[bpt/emacs.git] / man / msdog.texi
index 82e8651..e5eba8a 100644 (file)
@@ -140,6 +140,26 @@ faces are available and what they look like.
 how Emacs displays glyphs and characters which aren't supported by the
 native font built into the DOS display.
 
+@cindex cursor shape on MS-DOS
+  When Emacs starts, it changes the cursor shape to a solid box.  This
+is for compatibility with the Unix version, where the box cursor is the
+default.  This default shape can be changed to a bar by specifying the
+@code{cursor-type} parameter in the variable @code{default-frame-alist}
+(@pxref{Creating Frames}).  The MS-DOS terminal doesn't support a
+vertical-bar cursor, so the bar cursor is horizontal, and the
+@code{@var{width}} parameter, if specified by the frame parameters,
+actually determines its height.  As an extension, the bar cursor
+specification can include the starting scan line of the cursor as well
+as its width, like this:
+
+@example
+ '(cursor-type bar @var{width} . @var{start})
+@end example
+
+@noindent
+In addition, if the @var{width} parameter is negative, the cursor bar
+begins at the top of the character cell.
+
 @cindex frames on MS-DOS
   Multiple frames (@pxref{Frames}) are supported on MS-DOS, but they all
 overlap, so you only see a single frame at any given moment.  That
@@ -229,20 +249,20 @@ example, the name of a backup file for @file{docs.txt} is
 turn on support for long file names.  If you do that, Emacs doesn't
 truncate file names or convert them to lower case; instead, it uses the
 file names that you specify, verbatim.  To enable long file name
-support, set the environment variable @code{LFN} to @samp{y} before
+support, set the environment variable @env{LFN} to @samp{y} before
 starting Emacs.  Unfortunately, Windows NT doesn't allow DOS programs to
 access long file names, so Emacs built for MS-DOS will only see their
 short 8+3 aliases.
 
-@cindex @code{HOME} directory under MS-DOS
+@cindex @env{HOME} directory under MS-DOS
   MS-DOS has no notion of home directory, so Emacs on MS-DOS pretends
-that the directory where it is installed is the value of @code{HOME}
+that the directory where it is installed is the value of @env{HOME}
 environment variable.  That is, if your Emacs binary,
 @file{emacs.exe}, is in the directory @file{c:/utils/emacs/bin}, then
-Emacs acts as if @code{HOME} were set to @samp{c:/utils/emacs}.  In
+Emacs acts as if @env{HOME} were set to @samp{c:/utils/emacs}.  In
 particular, that is where Emacs looks for the init file @file{_emacs}.
 With this in mind, you can use @samp{~} in file names as an alias for
-the home directory, as you would in Unix.  You can also set @code{HOME}
+the home directory, as you would in Unix.  You can also set @env{HOME}
 variable in the environment before starting Emacs; its value will then
 override the above default behavior.
 
@@ -270,48 +290,41 @@ carriage-return linefeed when writing files.  The same mechanism that
 handles conversion of international character codes does this conversion
 also (@pxref{Coding Systems}).
 
-@cindex cursor location, under MS-DOS
-@cindex point location, under MS-DOS
+@cindex cursor location, on MS-DOS
+@cindex point location, on MS-DOS
   One consequence of this special format-conversion of most files is
 that character positions as reported by Emacs (@pxref{Position Info}) do
 not agree with the file size information known to the operating system.
 
-@vindex file-name-buffer-file-type-alist
-  Some kinds of files should not be converted, because their contents
-are not really text.  Therefore, Emacs on MS-DOS distinguishes certain
-files as @dfn{binary files}, and reads and writes them verbatim.  (This
-distinction is not part of MS-DOS; it is made by Emacs only.)  These
-include executable programs, compressed archives, etc.  Emacs uses the
-file name to decide whether to treat a file as binary: the variable
-@code{file-name-buffer-file-type-alist} defines the file-name patterns
-that indicate binary files.  Note that if a file name matches one of the
-patterns for binary files in @code{file-name-buffer-file-type-alist},
-Emacs uses the @code{no-conversion} coding system (@pxref{Coding
-Systems}) which turns off @emph{all} coding-system conversions, not only
-the EOL conversion.
-
   In addition, if Emacs recognizes from a file's contents that it uses
 newline rather than carriage-return linefeed as its line separator, it
-does not perform conversion when reading or writing that file.  Thus,
+does not perform EOL conversion when reading or writing that file.  Thus,
 you can read and edit files from Unix or GNU systems on MS-DOS with no
 special effort, and they will be left with their Unix-style EOLs.
 
-@findex find-file-text
-@findex find-file-binary
-  You can visit a file and specify whether to treat a file as text or
-binary using the commands @code{find-file-text} and
-@code{find-file-binary}.  End-of-line conversion is part of the general
-coding system conversion mechanism, so another way to control whether to
-treat a file as text or binary is with the commands for specifying a
-coding system (@pxref{Specify Coding}).  For example,
-@kbd{C-x @key{RET} c undecided-unix @key{RET} C-x C-f foobar.txt}
-visits the file @file{foobar.txt} without converting the EOLs.
-
   The mode line indicates whether end-of-line translation was used for
-the current buffer.  Normally a colon appears after the coding system
-letter near the beginning of the mode line.  If MS-DOS end-of-line
-translation is in use for the buffer, this character changes to a
-backslash.
+the current buffer.  If MS-DOS end-of-line translation is in use for the
+buffer, a backslash @samp{\} is displayed after the coding system
+mnemonic near the beginning of the mode line (@pxref{Mode Line}).  If no
+EOL translation was performed, the string @samp{(Unix)} is displayed
+instead of the backslash, to alert you that the file's EOL format is not
+the usual carriage-return linefeed.
+
+@cindex DOS-to-Unix conversion of files
+@pindex dos2unix
+  End-of-line conversion is part of the general coding system conversion
+mechanism, so the way to control whether to treat a text file as
+DOS-style or Unix-style is with the commands for specifying a coding
+system (@pxref{Specify Coding}).  For example, @kbd{C-x @key{RET} c unix
+@key{RET} C-x C-f foobar.txt} visits the file @file{foobar.txt} without
+converting the EOLs; if that file has carriage-return linefeed pairs at
+the end of its lines, Emacs will display @samp{^M} at the end of each
+line.  Similarly, you can force Emacs to save a buffer with specific EOL
+format with the @kbd{C-x @key{RET} f} command.  For example, to save a
+buffer with Unix EOL format, type @kbd{C-x @key{RET} f unix @key{RET}
+C-x C-s}.  Thus, visiting a file with DOS EOL conversion, then saving it
+with Unix EOL format effectively converts the file to Unix text style,
+like the popular program @code{dos2unix} does.
 
 @cindex untranslated file system
 @findex add-untranslated-filesystem
@@ -349,15 +362,59 @@ the function @code{remove-untranslated-filesystem}.  This function takes
 one argument, which should be a string just like the one that was used
 previously with @code{add-untranslated-filesystem}.
 
+  Designating a file system as untranslated does @strong{not} disable
+code conversions as specified by the coding systems set up by your
+language environment, it only affects the EOL conversions, by forcing
+Emacs to create new files with Unix-style newline-only EOLs.
+
+@vindex file-name-buffer-file-type-alist
+@cindex binary files, on MS-DOS/MS-Windows
+  Some kinds of files should not be converted at all, because their
+contents are not really text.  Therefore, Emacs on MS-DOS distinguishes
+certain files as @dfn{binary files}.  (This distinction is not part of
+MS-DOS; it is made by Emacs only.)  Binary files include executable
+programs, compressed archives, etc.  Emacs uses the file name to decide
+whether to treat a file as binary: the variable
+@code{file-name-buffer-file-type-alist} defines the file-name patterns
+that indicate binary files.  If a file name matches one of the patterns
+for binary files (those whose associations are of the type
+@code{(@var{pattern} . t)}, Emacs reads and writes that file using the
+@code{no-conversion} coding system (@pxref{Coding Systems}) which turns
+off @emph{all} coding-system conversions, not only the EOL conversion.
+@code{file-name-buffer-file-type-alist} also includes file-name patterns
+for files which are known to be DOS-style text files with
+carriage-return linefeed EOL format, such as @file{CONFIG.SYS}; Emacs
+always writes those files with DOS-style EOLs.
+
+  If a file which belongs to an untranslated file system matches one of
+the file-name patterns in @code{file-name-buffer-file-type-alist}, the
+EOL conversion is determined by @code{file-name-buffer-file-type-alist}.
+
+@findex find-file-text
+@findex find-file-binary
+  You can visit a file and specify whether to treat it as text or binary
+using the commands @code{find-file-text} and @code{find-file-binary}.
+@code{find-file-text} specifies DOS EOL conversions, but leaves the
+other coding conversions unspecified (Emacs determines the required
+conversions via the usual defaults and coding-detection mechanisms).  On
+the other hand, @code{find-file-binary} turns off @emph{all}
+coding-system conversions.
+
+@findex find-file-literally@r{, and binary files}
+  The @code{find-file-text} and @code{find-file-binary} commands are
+only available when Emacs runs on MS-DOS or MS-Windows.  The command
+@code{find-file-literally}, which is available on all platforms,
+produces the same effect as @code{find-file-binary}.
+
 @node MS-DOS Printing
 @section Printing and MS-DOS
 
   Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
-@code{ps-print-buffer} (@pxref{Postscript}) can work in MS-DOS and
+@code{ps-print-buffer} (@pxref{PostScript}) can work in MS-DOS and
 MS-Windows by sending the output to one of the printer ports, if a
 Unix-style @code{lpr} program is unavailable.  This behaviour is
 controlled by the same variables that control printing with @code{lpr}
-on Unix (@pxref{Hardcopy}, @pxref{Postscript Variables}), but the
+on Unix (@pxref{Hardcopy}, @pxref{PostScript Variables}), but the
 defaults for these variables on MS-DOS and MS-Windows are not the same
 as the defaults on Unix.
 
@@ -378,7 +435,7 @@ also use a printer shared by another machine by setting
 @code{"//joes_pc/hp4si"}.  (It doesn't matter whether you use forward
 slashes or backslashes here.)  To find out the names of shared printers,
 run the command @samp{net view} at a DOS command prompt to obtain a list
-of servers, and @samp{net view server-name} to see the names of printers
+of servers, and @samp{net view @var{server-name}} to see the names of printers
 (and directories) shared by that server.
 
   If you set @code{printer-name} to a file name, it's best to use an
@@ -423,7 +480,7 @@ when @code{lpr-command} is not @code{""}.  If the variable
 @vindex ps-lpr-command @r{(MS-DOS)}
 @vindex ps-lpr-switches @r{(MS-DOS)}
   A parallel set of variables, @code{ps-lpr-command},
-@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{Postscript
+@code{ps-lpr-switches}, and @code{ps-printer-name} (@pxref{PostScript
 Variables}), defines how PostScript files should be printed.  These
 variables are used in the same way as the corresponding variables
 described above for non-PostScript printing.  Thus, the value of
@@ -633,7 +690,7 @@ Processes}.
 
 @cindex printing under MS-DOS
   Printing commands, such as @code{lpr-buffer} (@pxref{Hardcopy}) and
-@code{ps-print-buffer} (@pxref{Postscript}), work in MS-DOS by sending
+@code{ps-print-buffer} (@pxref{PostScript}), work in MS-DOS by sending
 the output to one of the printer ports.  @xref{MS-DOS Printing}.
 
   When you run a subprocess synchronously on MS-DOS, make sure the