1. Introduction
   ------------

GNU Emacs 20 compiled with DJGPP v2.x is hereby available as part of
the DJGPP archives.

Emacs is an extremely powerful, extensible, customizable editor.  It
serves as a programmer's editor, a programming environment, and much
more.  Some say it's an operating system in disguise.  Others say it's
a way of life...

Apart of usual features you'd expect to find in an editor, Emacs
offers many advanced editing features, and also many features that
most editors usually don't have at all.

Here are some of the advanced editing features that you should try
(the names of relevant commands and optional packages are in
parentheses):

 - support for every imaginable programming language on Earth (Ada,
   Assembly, Awk, C, C++, Java, Perl, Fortran, Pascal, Prolog, Simula,
   Scheme, SQL, Tcl, VHDL, Texinfo, TeX, Nroff, SGML/HTML)
 - compilation from within the editor (`M-x compile')
 - invoking Grep and Diff from within the editor (M-x grep, M-x diff)
 - user-extensible syntax highlighting (font-lock)
 - automatic highlighting of matching parentheses (paren)
 - finding function/macro definitions (M-.)
 - reading Info docs (info) and man pages (man)
 - interface to version control software (RCS, CVS) (vc)
 - automatic expansion of partially-typed words (by pressing M-/)
 - passing part of a buffer to an external program, and inserting its
   output into the buffer (M-|, M-!)
 - saving and restoring of Emacs state between sessions (desktop)
 - color-enhanced comparison of files and directories (ediff)
 - you can use Emacs as a word processor (enriched)
 - you can use Emacs as a hex editor of binary files (hexl)
 - integrated spell-checking (ispell)
 - printing (`M-x lpr-buffer' and `M-x ps-print-buffer')
 - built-in sorting of files, buffers, or parts thereof (sort)
 - emulation of other editors (EDT, TPU, vi, Brief, even WordStar)

Here are some of the features you probably won't expect to find in an
editor:

 - editing compressed archives--zip, zoo, lzh, tar, etc.--(arc-mode)
 - ``editing'' a directory: use Emacs as a file manager (dired)
 - display of calendar (calendar) and holydays (holyday), and
   management of appointment diary (diary)
 - computation of lunar phases (lunar) and sunrise/sunset (solar)
 - packages for reading email (RMAIL) and news groups (Gnus)
 - games (tetris, gomoku, life, solitaire)
 - invoking arbitrary commands at certain time: you can use Emacs as
   your system manager or a cron daemon (midnight)

Emacs 20 has several significant improvements and enhancements as
compared to version 19; it is also significantly larger (run-time
memory footprint grows by about 1MB, the disk storage now needs about
10MB more space) and somewhat slower.  (On the other hand, typical
desktop machines got much faster and memory-adbundant.)

Emacs can be compiled with DJGPP out of the box, and you are
encouraged to get the latest version from the GNU ftp sites and build
it by yourself.  But if you don't have the time, necessary tools or
disk storage required to unpack the full source distribution and build
Emacs, you can get the pre-built binaries and only those parts of the
package that you need from the DJGPP sites.

The single most important new feature in Emacs 20 is support for
multilingual editing.  You can now edit files in many different
languages, and type text in any supported language, even if your
version of the OS doesn't have a built-in support for that language.
You can mix several languages in the same buffer, read and write files
in many different encodings for non-ASCII characters, and print
non-ASCII text to a PostScript printer.

The DJGPP version of Emacs includes full support for all these
features.  The only multilingual feature whose support is somewhat
limited is the display of non-ASCII characters.  Emacs can directly
display a single non-ASCII character set--the one supported by the
installed DOS codepage.  It can also display all single-byte character
sets, such as Latin-1, Cyrillic, Greek, Hebrew, and other ISO 8859
character sets; however, where these scripts don't have corresponding
glyphs in the current codepage, Emacs _simulates_ those glyphs with
ASCII strings.  For example, the Latin letter ``c with cedilla'' is
displayed as "{,c}" if the codepage doesn't support that letter.  This
looks somewhat awkward, but the text is still readable by a person who
knows the language.  Characters from Far-Eastern scripts, such as
Chinese, Japanese, or Korean, can only be displayed when Emacs runs on
versions of DOS/Windows localized for those countries.  For more
details, see the section "MS-DOS and MULE" in the on-line manual.

Another significant new feature is Customize: an interactive package
for customizing every feature and option in Emacs without knowing any
of Emacs Lisp, the language used to extend and customize the editor.

There are lost and lots of other new features, too many to list here.
See the file NEWS in the distribution for a full list.

You will want to install this version instead of Emacs 19, if: (1) you
need the multilingual support, or some of the other major new
features; (2) you don't care about the slow-down of Emacs operation,
or have a fast machine with enough RAM where that slow-down and the
larger memory footprint aren't noticeable; or (3) you are an Emacs
addict and absolutely must have the latest and the greatest...

You will want to stick to Emacs 19 if: (1) you want non-ASCII files to
be displayed as literal bytes; (2) you have a slow and memory-starved
machine; or (3) you need the leanest, meanest Emacs possible.

The binaries here were produced from the official version 20.5 of GNU
Emacs, with the following changes:

    * Built-in spelling works.  You need to download and install the
      DJGPP port of Ispell, v2gnu/ispNNNb.zip, to be able to take
      advantage of this feature.

    * Texinfo mode knows about the new commands (like @env) introduced
      in the latest release 4.0 of the GNU Texinfo package.

    * Arguments passed to subsidiary commands are quoted in accordance
      to the quoting style supported by all DJGPP programs.

    * A few Y2K-related problems in the Version Control support are
      corrected.  These corrections were lifted from Emacs 20.6
      pretest distribution.


2. Files
   -----

Emacs is a very large package.  To make downloading it easier, the
archive here is divided into several zip files.  Some files are
*required* for running Emacs, others are needed if you want to use
specific optional features, still others are only needed if you want
to rebuild Emacs (e.g., if you discover a bug).  Here is the list of
the files:

  em2005b.zip   Binaries and runtime support, required.
  em2005li.zip  Lisp sources of Emacs packages, recommended.
  lei2005b.zip  Library of Emacs Input methods, required for typing
		non-ASCII text.
  ifonts12.zip  Intlfonts 1.2, fonts for printing all non-ASCII
		scripts except Chinese, Japanese, and Korean.
  ifnt12cn.zip  Intlfonts 1.2 for Chinese scripts.
  ifnt12jk.zip  Intlfonts 1.2 for Japanese and Korean scripts.
  em2005s1.zip  Emacs sources required for building Emacs with DJGPP.
  em2005s2.zip  Emacs sources not required for the DJGPP version.
  lei2005s.zip  Sources for Leim, Library of Emacs Input methods.

The approximate disk storage that you will need for the package is as
follows:

  Binaries and runtime support (em2005b.zip)....................39MB
  Additional storage for Elisp sources (em2005li.zip)...........34MB
  Additional storage for Leim (lei2005b.zip).....................4MB
  Additional storage for Intlfonts (ifonts12.zip)................2MB
  Additional storage for Chinese fonts (ifnt12cn.zip)...........31MB
  Additional storage for Japanese/Korean fonts (ifnt12jk.zip)....6MB
  Additional storage for DJGPP sources (em2005s1.zip)...........15MB
  Additional storage for the full sources........................3MB
  Additional storage for Leim sources (lei2005s.zip)............10MB

(These numbers may vary depending on the cluster size of your disk.)

If you can afford the disk space, downloading and installing the Elisp
sources (em2005li.zip) is *highly* recommended, because the best docs
for each Elisp package can be always found at the beginning of its .el
file; if you can't figure out something by reading the on-line manual,
always read the comments at the beginning of the .el package that
defines the function(s) you are after.  (The GNU Emacs Lisp Manual,
available from GNU FTP sites, is highly recommended if you seek deep
understanding of how the Elisp code works.)

The em2005li.zip package is also required if you want to dump Emacs
with some non-standard features.  To this end, the pure undumped Emacs
executable, temacs.exe, is included in em2005li.zip.  The TAGS files,
required to quickly find any function in the Emacs sources, are also
included.

The Leim package, lei2005b.zip, is only required if you need to *type*
non-ASCII text at the keyboard; reading, writing, and displaying
non-ASCII text do *not* require Leim.

The various Intlfonts zip files are only used for printing non-ASCII
text to PostScript printers, when the characters of that text are not
directly supported by the printer's internal fonts.  If you don't care
about printing foreign text, or don't have a PostScript printer in the
first place, don't bother downloading these files (they are rather
big).

The rest of the package is only required if you want to recompile
Emacs or debug it.  Note that if you want to rebuild Emacs with DJGPP,
you will only need em2005s1.zip; building Emacs with Leim support
requires lei2005s.zip as well.  The rest of the source distribution
(in em2005s2.zip) isn't used to compile Emacs with DJGPP and is here
only for completeness' sake.  The file `INSTALL' in the main Emacs
directory describes (at its end) how to build Emacs with DJGPP.  The
distribution has already been configured for DJGPP v2.x, so you don't
need to run config.bat if you use DJGPP v2.


3. Getting started
   ---------------

To install the pre-built distribution of Emacs, follow these steps:

   * Go to your main DJGPP installation directory.  If you don't have
     DJGPP installed, you can install Emacs in any directory you want.

   * Unzip all the files that you want to install:

	      unzip32 em2005b.zip
	      unzip32 em2005li.zip
	      unzip32 lei2005b.zip

     etc.  The above example uses the unzip32.exe program, available
     from the same place where you downloaded Emacs.  If you use
     PKUNZIP, don't forget the -d switch, like so:

	      pkunzip -d em2005b.zip

     If you unzip the files on Windows 9X or Windows 2000, make sure
     you use an unzip program that supports long file names in zip
     archives.  Unzip32.exe, available from the DJGPP archives, and
     djtar.exe, distributed as part of the basic DJGPP development
     environment djdevNNN.zip, both support long file names on those
     operating systems, so I recommend to use one of these programs to
     unzip the package.

     If you install Emacs on Windows NT, you must use an unzip program
     that truncates long file names to the DOS 8+3 limits.  Again,
     unzip32 and djtar will do the right thing for you.

   * When you unzip the archives, a directory called `emacs' is created
     in the `gnu' subdirectory of the DJGPP tree, with several
     subdirectories.  Add the `gnu/emacs/bin' directory to your PATH.
     If you don't have DJGPP installed, and you have Info files from
     other packages on your system, add the `gnu/emacs/info' directory
     to your INFOPATH environment variable.

   * On Windows 9X/2K, you should set LFN=y in the environment, or the
     long file names might not work for you.  (Long file names are NOT
     supported on Windows NT.)  Also, I advise to set the "DPMI
     Memory" property of the DOS box to 65535KB (unless you have more
     than 64MB physical memory installed), so that Emacs could use
     lots of memory.

   * If you are a new user of Emacs, be sure to begin by reading the
     Emacs tutorial.  To this end, invoke Emacs and choose the
     "Emacs Tutorial" item from the "Help" submenu (on the menu bar).
     Emacs should automatically choose the tutorial in your native
     language, if such a tutorial is available; if not, the tutorial
     in English shall be displayed.

   * An example start-up file is included under the name
     `_emacs.xmpl'; you can use it as a starting point for your
     customizations by renaming it to `_emacs'.  (Emacs automatically
     searches for and loads a file named `_emacs' at start-up.)
     Please don't complain if you don't like the settings of
     `_emacs.xmpl', as they are my own preferences.  Emacs is about
     total freedom of tailoring a program to your liking, so just
     change them as you see fit and move on.

     New users are advised to avoid using the example start-up file
     until they get hold of the Emacs basics, because that example
     disables the message about most important commands printed at
     startup.  If you ever get stuck inside Emacs and need a quick way
     of bailing out, you will need those instructions.

   * The file `gnu/emacs/etc/refcard.ps' can be printed on a
     PostScript printer to produce a handy reference card for most
     frequently used Emacs commands and features.

   * If you run Emacs under Windows 9X/2K, you might find the icon
     files in the `gnu/emacs/nt/icons' directory useful for placing an
     Emacs shortcut on your desktop.  Users of Windows 3.X should use
     the files `gnu/emacs/msdos/emacs.pif' and
     `gnu/emacs/msdos/emacs.ico' instead.

   * To make full use of several optional Emacs features, consider
     installing additional packages:

      - The man clone (v2apps/manNNb.zip), Less (v2gnu/lssNNNb.zip),
        Gawk (v2gnu/gwkNNNb.zip), and Sed (v2gnu/sedNNNb.zip) for
        reading man pages inside Emacs.

      - Grep (v2gnu/grepNNb.zip) and Findutils (v2gnu/findNNb.zip) for
        using the `M-x grep' and `M-x grep-find' commands.

      - Diffutils (v2gnu/difNNNb.zip) for the `M-x diff' command and
        the commands provided by the Ediff package.

      - RCS (v2gnu/rcsNNNb.zip) or CVS (v2gnu/cvsNNNb.zip) for the
        Emacs built-in Version Control support.

      - Ispell (v2gnu/ispNNNb.zip) for spell-checking commands.

The zip files are LFN-clean, which means they can be unzipped on
Windows 9X (or any other system that supports long filenames); in that
case all the files will get their original long names, including the
letter-case (e.g., `ChangeLog', `FAQ', etc.).  Note that if you want
LFN support within Emacs (i.e., you set LFN=y in the environment), you
*must* unzip the archives with an unzip program that supports long
filenames, or else Emacs won't be able to find some of its files.  If
you want to be able to run Emacs from both Windows 9X and plain DOS,
you need to set the NameNumericTail property in the Registry to 0
before you unzip the package (you may return the setting to 1 after you
finish unzipping).  The DJGPP FAQ list explains the details of how to
change this setting.


4. Building Emacs from sources
   ---------------------------

To rebuild Emacs from sources, follow these steps:

   * Unzip em2005b.zip as described above.  If you want to build Emacs
     with Leim, unzip lei2005b.zip as well.

   * Unzip the source distribution from the same directory:

	      unzip32 em2005s1.zip
	      unzip32 lei2005s.zip

     (lei2005s.zip is only needed if you want to rebuild Emacs with
     Leim.)

     The above example uses the unzip32.exe program, available from
     the same place where you downloaded Emacs.  If you use PKUNZIP,
     don't forget the -d switch, like so:

	      pkunzip -d em2005b.zip

     If you unzip the files on Windows 9X or Windows 2000, make sure
     you use an unzip program that supports long file names in zip
     archives.  Unzip32.exe, available from the DJGPP archives, and
     djtar.exe, distributed as part of the basic DJGPP development
     environment djdevNNN.zip, both support long file names on those
     operating systems, so I recommend to use one of these programs to
     unzip the package.

     If you install Emacs on Windows NT, you must use an unzip program
     that truncates long file names to the DOS 8+3 limits.  Again,
     unzip32 and djtar will do the right thing for you.

     Note: you *must* unzip the source distributions on top of the
     binary distributions, since the build process relies on some of
     the files that come with the binary zips.

   * In the `gnu/emacs' directory, type "make install" and press
     [Enter] to build the package.  This puts the compiled executables
     in the `gnu/emacs/bin' subdirectory.

   * If you change some of the configuration scripts (in the
     `gnu/emacs/msdos' subdirectory) or the `config.bat' batch file,
     you will need to run "config msdos" before "make install".



5. Troubleshooting
   ---------------

If you invoke Emacs on Windows 9X or Windows NT, and it doesn't find
some of its files, you have a problem related to long file names.  On
Windows 9X/2000, try setting LFN=y in the environment before running
Emacs; if that doesn't help, set LFN=n and try again.  If it only
works with LFN=n on Windows 9X, you need to unzip the distribution
again using a program which supports long file names in zip archives.
I recommend unzip32.exe, available from the DJGPP sites.

If Emacs doesn't find some of its files on Windows NT, make sure you
unzip the distribution with a program which truncates the long file
names to DOS 8+3 limits.  Again, unzip32.exe will do the right thing.

If you have any other trouble with using Emacs, it is recommended to
perform the following steps in order:

   * Read the on-line docs which describe the command you use.

   * Look up your problem in the Emacs FAQ list (choose
     "Help->Manuals->Emacs FAQ" from the menu bar).

   * Consult the file `PROBLEMS' in the main Emacs directory for
     solutions to known problems.

   * Read the chapter about reporting bugs in the on-line manual.  The
     file `BUGS' in the main Emacs directory describes how to find
     that chapter, if you have trouble with that.

You can post questions and requests for help to the gnu.emacs.help
news group if none of the above seems to help. (Problems that seem to
be DOS- or DJGPP-related can be reported to the comp.os.msdos.djgpp
news group first.)



                   Enjoy.

                                    Eli Zaretskii <eliz@is.elta.co.il>
