===============================================================================
GNU Emacs 19.30.1 for emx (OS/2 2.0, 2.1, and 3.0)                  17-Dec-1995
===============================================================================

Introduction
============

This is GNU Emacs 19.30 for emx on OS/2 2.0, 2.1, and 3.0.  The port
was done by Eberhard Mattes based on ideas of the port of GNU Emacs
for OS/2 done by J”rg Viola.  This port of GNU Emacs also works with
emx on MS-DOS, but that hasn't been tested.

See \emacs\19.30\data\FAQ for a list of frequently asked questions with
answers for GNU Emacs.

See \emacs\19.30\emx\FAQ for a list of frequently asked questions with
answers specific to this port of GNU Emacs.  That file is contained in
e30min.zip.

GNU Emacs is free software.  See \emacs\19.30\etc\COPYING for details.
Note that you are not allowed to distribute GNU Emacs without source
code.


Distribution files
==================

The `GNU Emacs 19.30 for emx' distribution consists of the following
files:

  README                this file (/emacs/19.30/emx/README)
  e30el1.zip            Emacs Lisp files (source), part 1
  e30el2.zip            Emacs Lisp files (source), part 2
  e30el3.zip            Emacs Lisp files (source), part 3
  e30info.zip           info files (on-line help)
  e30lib1.zip           Emacs Lisp library (base set, compiled)
  e30lib2.zip           Emacs Lisp library (remaining files, compiled)
  e30man.zip            documentation files (mostly for TeX)
  e30min.zip            minimal set of files for running GNU Emacs
  e30more.zip           additional files
  e30net.zip            additional files for network support
  e30rest.zip           remaining files
  e30src.zip            sources

The `30' in `e30*.zip' is the minor version number.  For example,
e83*.zip will be used for Emacs 19.83.


Other files of interest
=======================

GNU Emacs 19.30 for emx requires emx 0.9b or later -- if you have an
older version of emx.dll, emxbind.exe, and termcap.dat, get emxrt.zip
from

  ftp.uni-stuttgart.de: /pub/systems/os2/emx-0.9b
  ftp-os2.cdrom.com :   /pub/os2/lang/emx09b
  src.doc.ic.ac.uk:     /packages/os2/lang/emx09b
  ftp.leo.org:          /pub/comp/os/os2/gnu/emx+gcc

Also get the latest emxfix??.zip (only the latest one is required).

You might want to also get the following files:

  ftp-uni.stuttgart.de: /pub/systems/os2/emx-0.9b/contrib/xf86s363.zip
  ftp-uni.stuttgart.de: /pub/systems/os2/emacs-19/contrib/small.zip
  ftp-os2.cdrom.com:    /pub/os2/shellutl/ms_sh23b.zip
  ftp-os2.cdrom.com:    /pub/os2/shellutl/bash_112.zip
  ftp-os2.cdrom.com:    /pub/os2/editors/isp31b2.zip
  ftp.leo.org:          /pub/comp/os/os2/gnu/systools/gnufutil.zip
  ftp.leo.org:          /pub/comp/os/os2/gnu/systools/gnututil.zip
  prep.ai.mit.edu:      /pub/gnu/elisp-manual-19-2.4.tar.gz
  prep.ai.mit.edu:      /pub/gnu/emacs-lisp-intro-1.04.tar.gz

xf86s383.zip contains Holger Veit's xf86sup.sys driver.  GNU Emacs
can use the pty devices provided by that driver.  For ange-ftp,
GNU Emacs requires xf86sup.sys.

smallfnt.zip or small.zip contains a small fixed-width bitmapped font
for the Presentation Manager.  See below on how to fix a bug of
smallfnt.zip (small.zip is a fixed version).

ms_sh23b.zip contains the Data Logic shell, a Unix-like shell.
bash.zip contains bash, another Unix-like shell.

isp31b2.zip contains Ispell, a spelling checker, which can be used
with GNU Emacs.

gnufutil.zip contains the GNU file utilities.  ls.exe is required for
`dired' and for `recover-file'.  (Please note that other versions of
`ls.exe' won't work without disabling `pnh-ls' in emx-patch.el.)

gnututil.zip contains the GNU text utilites.  pr.exe is required for
`print-buffer' (Tools->Print_Buffer).

elisp-manual-19-2.3.tar.gz contains the Emacs Lisp documentation.


Installing the emx runtime package
==================================

Install the emx runtime package emxrt.zip (version 0.9b or later) if
not already installed.  First, unpack the files of the emx runtime
package to your hard disk:

  cd \
  unzip a:emxrt

Installation of the emx runtime package involves changing the LIBPATH
statement of your config.sys file and setting the following
environment variables in config.sys:

  TERMCAP  name of termcap file, defaults to /emx/etc/termcap.dat

  TERM     name of the terminal, possible values include rmono,
           ansi-color-2, and ansi-color-3

  PATH     include \emx\bin in your PATH

Example (the emx runtime package is installed on drive C):

  LIBPATH=C:\OS2\DLL;[...];c:\emx\dll
  SET PATH=C:\OS2;C:\OS2\SYSTEM;[...];c:\emx\bin
  SET TERMCAP=c:/emx/etc/termcap.dat
  SET TERM=ansi-color-3

See \emx\doc\emxrt.doc and \emx\book\emxrt.inf for details on
installing the emx runtime package.


Installing GNU Emacs
====================

This section describes how to install the compiled version of GNU
Emacs 19.30 for emx on OS/2.

GNU Emacs is installed in the \emacs directory of an HPFS drive.

1.  Get lots of disk space on an HPFS partition.  As this version of
    GNU Emacs doesn't bother about 8.3 file names, you can't install
    it on a FAT partition.  (Well, probably you can, but it has not
    been tested -- see below for some hints.)  However, you can edit
    files on FAT partitions.

    If you have not installed the REXX component of OS/2, you may want
    to install it now.  REXX is required by instemacs.cmd.

2.  Set appropriate environment variables (set them in config.sys):

      SHELL          name of the command processor, defaults to
                     /bin/sh.  If you have a Unix-like shell (such as
                     bash or the Data Logic shell), you should use the
                     pathname of that shell.  Otherwise, use the path
                     name of cmd.exe

      SYSTEMNAME     initializes system-name, the name of the
                     machine.  The default value is "my-system"

      HOME           the pathname of your home directory, replaces ~
                     in pathnames.  Emacs tries to load .emacs, for
                     instance, from that directory

      TMP            directory for temporary files.  The default is
                     the current working directory

      TMPDIR         another directory for temporary files.  The ediff
                     packages uses this; the directory must be on an
                     HPFS drive for ediff

    Example (Emacs will be installed on drive C):

      SET PATH=C:\OS2;[...];C:\EMACS\19.30\BIN
      SET SHELL=c:/bin/bash.exe
      SET SYSTEMNAME=vergil
      SET HOME=c:/home
      SET TMP=c:/tmp
      SET TMPDIR=c:/tmp

    Note that EMACSLOADPATH, EMACSDATA, EMACSPATH, and INFOPATH are no
    longer required -- please delete them unless you want to override
    or supplement the default directories, or put emacs.exe into a
    directory not related to the Emacs directory hierarchy.  The
    default directories are now relative to the directory from which
    emacs.exe is run.

3.  Reboot your computer to activate the new config.sys settings.

4.  To install a minimal version of GNU Emacs, change to the target
    drive (which should be formatted with HPFS) and unpack the file
    e30min.zip by typing

      cd \
      unzip a:e30min

    Note that you cannot use PKUNZIP to unpack the ZIP files.

5.  Create a preloaded version of GNU Emacs by typing

      cd \emacs\19.30\bin
      dump

    Note: If you are installing GNU Emacs on a HPFS drive, ensure that
    the EMXOPT environment variable does not contain `-t'.  Otherwise,
    Emacs won't find some of its files.

    Required disk space: 6 MByte, total.  In case you are short of disk
    space, you can delete the files \emacs\19.30\bin\temacs and
    \emacs\19.30\etc\DOC now.  If you want to dump Emacs again,
    restore these files from e30min.zip.

6.  Now you can run GNU Emacs by typing

      emacs                   (run Emacs in text mode)
      emacs -pm               (run Emacs in PM mode)

7.  The minimal version of GNU Emacs installed now is hardly usable.
    For instance, there is no on-line help.  You should install
    additional files:

      cd \
      unzip a:e30lib1
      unzip a:e30more
      unzip a:e30info

    Required disk space: 13 MByte, total.  You can save some disk
    space by compressing all files but `dir' in \emacs\19.30\info with
    `compress' or `gzip'.

    To add network support (mail and news), install additional files:

      cd \
      unzip a:e30net

    This requires about an additional 1 MByte of disk space.

8.  To unpack all the .el files, type

      cd \
      unzip a:e30el1
      unzip a:e30el2
      unzip a:e30el3

    For running GNU Emacs, only the compiled (.elc) files are
    required. You need the .el files if you need documentation about
    the various Emacs Lisp packages or want to change them.  Required
    disk space: 24 Mbyte, total.

    Additional files are packaged in the remaining ZIP files:

      cd \
      unzip a:e30lib2
      unzip a:e30rest
      unzip a:e30man

    These files are usually not required for running GNU Emacs under
    emx.  Required disk space: 31 MByte, total.

9.  You might want to add program objects for the programs

      c:\emacs\19.30\bin\emacs.exe
      c:\emacs\19.30\bin\emacsclient.exe

    to an appropriate folder.  There is a REXX program called
    instemacs.cmd to do this for you.  Type

      instemacs

    to get a list of options.  To simply create the program objects,
    type

      instemacs install

    This creates a folder called `New Things' on your desktop which
    contains the new objects.  If you would like to create a shadow of
    Emacs in your startup folder, you can additionally use the
    `startup' option.  To automatically associate Emacsclient with
    plain text files, use the `associate' option.  instemacs.cmd will
    copy the current associatations of the OS/2 System Editor for
    Emacsclient.  For Emacsclient to work, an instance of Emacs must
    be running and the server must be active.  You will probably want
    to put the line

      (server-start)

    in your site-start.el file (see below) and use the `startup'
    option.

    In a standard OS/2 installation, the OS/2 System Editor is
    automatically associated with text files so that double clicking a
    text file opens the System Editor.  You can specify the
    `makedefault' option when calling instemacs.cmd to make
    Emacsclient the default `view' for text files.

    NOTE: The `makedefault' option of instemacs.cmd manipulates the
    Workplace Shell associations in an undocumented way by directly
    accessing certain values in OS2.INI.  This has only been tested
    under OS/2 2.1 GA (US version).  There is no guarantee that this
    will work on any other version of OS/2.  But then there is no
    guarantee that any of the programs in this package will work at
    all, anyway :-).

    Note that instemacs.cmd creates the program objects in such a way
    that emacs.exe is started as a Presentation Manager program,
    although it is actually a text mode program.  This is because
    emacs.exe actually calls pmemacs.exe to provide the PM interface.
    If emacs.exe were started as a text mode program, it would have
    its own VIO window, which is usually useless.

    Starting emacs.exe as a PM program has two known disadvantages:

    (a)  You don't see the standard output of emacs.exe.  If Emacs
         crashes for any reason, you won't see any diagnostics or
         error messages and you can't tell Emacs to auto-save (if it
         happens to ask).

    (b)  If you double click on the Emacs object when Emacs is already
         running and a session bond between emacs.exe and pmemacs.exe
         has not been established (see pm-session-bond below), you
         will not bring the Emacs window to the foreground but
         something else, usually the Window List.  Double clicking on
         Emacs in the Window List works, of course.

    If you feel you would like a more conventional program object for
    Emacs, you can use the `keepvio' option of instemacs.cmd.  This
    causes the Emacs object to start emacs.exe in a minimized VIO
    window.  This solves problem (a) and changes problem (b) to the
    problem (b') that double clicking on the Emacs object shows the VIO
    window of emacs.exe, not the PM Window you are really interested
    in.

    If all this sounds too complicated to you, simply try
    instemacs.cmd with and without the `keepvio' option and see which
    way you like it better.  Calling instemacs.cmd again does not
    create new objects but updates the existing objects according to
    the options.  You can also use this feature if you accidentally
    change the settings of the Emacs object or lose the icon.


Hints for installing GNU Emacs on a FAT drive
=============================================

To make GNU Emacs run from a FAT drive, add the following line to
\emacs\19.30\lisp\site-sta.el (truncated name of site-start.el):

  (setq vc-master-templates '(("%sRCS/%s" . RCS)))

To install and to run GNU Emacs, use

  set emxopt=-t

to let emx.dll (and emx.exe) truncate file names to 8.3 format.  As
that setting may cause strange effects for other applications, you
should use it for GNU Emacs only, for instance, by using the following
OS/2 batch file:

  @echo off
  setlocal
  set emxopt=-t
  emacs
  endlocal


Customizing GNU Emacs
=====================

You should customize \emacs\19.30\lisp\site-start.el, the startup file
of GNU Emacs.  The statements in that file are executed automatically
each time GNU Emacs is started.  Moreover, you can put personal
settings into a file named .emacs file in your home directory (set by
the HOME environment variable).

Sample site-start.el file:

---------------------------------------------------------------------
(set-input-mode nil nil 1)                            ; [1]

(setq default-frame-alist                             ; [2]
      (append '((altgr-modifier . meta)
                (shortcuts . (alt-f4))
                (menu-font . "8.Helv"))
              default-frame-alist))

(standard-display-8bit 128 254)                       ; [3]

(set-display-table-slot standard-display-table 'truncation      16)  ; [4]
(set-display-table-slot standard-display-table 'wrap            31)
(set-display-table-slot standard-display-table 'control         24)
(set-display-table-slot standard-display-table 'vertical-border 186)

(add-hook 'server-request-hook                        ; [5]
          '(lambda ()
             (make-frame-visible)
             (focus-frame (selected-frame))))

(autoload 'os2help "os2help" "OS/2 on-line help" t)   ; [6]
(setq os2help "/emx/book/emxdoc.ndx")
(global-set-key [C-f1] 'os2help)

(if window-system
    (progn
      (pm-edit-menu)                                  ; [7]
      (pm-files-menu)                                 ; [8]
      ;;(remove-from-window-list)                     ; [9]
      (pm-session-bond t)                             ; [10]
      (set-face-background 'modeline "red")           ; [11]
      (set-face-foreground 'modeline "yellow")
      (make-face 'info-node)                          ; [12]
      (copy-face 'bold 'info-node)))
---------------------------------------------------------------------

Notes:

[1]   Enable 8-bit input.  set-input-mode must be called when running
      Emacs -- calling it before dumping doesn't work

[2]   Use the right ALT key of non-US keyboards as META key.  This
      does not work for all key combinations.  Note that the right ALT
      key of US keyboards is equivalent to the left ALT key.

      Enable the Alt+F4 shortcut key for closing the frame.

      Use a small font for menus.

      Add new parameters to the front of the list!

[3]   Display characters 128 through 254 as-is.  Without this
      statement, octal notation is used for these characters

[4]   Use special symbols (which are not displayed as-is when
      occurring in a buffer) for truncated screen lines, continued
      lines, for displaying control characters, and for separating
      side-by-side windows

[5]   Raise frame to the foreground if emacsclient requests a buffer

[6]   Use C-f1 to invoke OS/2 on-line help.  You have to set the
      os2help variable to point to an EPM index file.  See os2help.el
      for details

[7]   Modify the Edit menu of the menu bar to use the OS/2 clipboard
      for Cut, Copy, and Paste

[8]   Modify the Files menu of the menu bar to use OS/2's standard file
      dialog for `Open File...' and `Save Buffer As...'

[9]   Remove emacs.exe from the Window List.  See below for a
      discussion of advantages and disadvantages.  In the default
      site-start.el file, this statement is disabled.  You might want
      to uncomment this statement if you use the PM interface and
      don't run Emacs manually.  If you enable
      remove-from-window-list, you should disable pm-session-bond

[10]  Establish a bond between emacs.exe (the VIO window) and
      pmemacs.exe (the PM windows).  If you select emacs.exe, for
      instance by using the Window List, one of the PM windows will be
      selected instead of emacs.exe

[11]  Make the mode line yellow on red

[12]  Don't use an italic font for info nodes


About file names
================

As the syntax of OS/2 file names differs from the syntax of Unix file
names, there are some things to keep in mind when using file names.


Drive letters
-------------

Drive letters are attached to nearly all file names.  That causes
problems with Emacs Lisp packages assuming that only file names
starting with / or ~ are absolute file names.  Emacs tries to avoid
attaching drive letters for remote files handled by ange-ftp, assuming
that the ftp server runs on a Unix machine.


Letter case
-----------

All file names are translated to lower case (unless the new
`case-fold-file-names' variable is set to `nil').  This is required as
GNU Emacs thinks that non-equality of file names implies non-identity
of files.  Under OS/2 and DOS, however, letter case does not matter in
file names.

If you want to edit files on a case-sensitive file-system such as NFS,
set `case-fold-file-names' to `nil'.  However, that feature has not
been tested.  If `case-fold-file-names' is `nil', do not attempt to
visit a file twice using two file names differing only in letter case!

If you want to keep the letter case in file names on HPFS, see
`Choosing the backup type'.  Alternatively, you can try setting
`preserve-file-name-case' to t.  If `preserve-file-name-case' is t,
`expand-file-name' will store the original case of each character of a
file name in text properties of the string returned (the string proper
will still be all-lower-case).  When creating, copying, or renaming a
file, Emacs will use those text properties to reconstruct the original
spelling of the file name.  This feature is quite experimental.  There
is a known disadvantage of setting `preserve-file-name-case' to t:
file names displayed by `repeat-complex-command' (C-x ESC ESC, C-.)
will be quite illegible as it shows all the text properties.


Forward slashes vs. backward slashes
------------------------------------

Better use forward slashes (/) instead of backslashes (\) in path
names as some places where Emacs checks for / might have slipped my
attention.


Trailing dots
-------------

Emacs doesn't know that trailing dots in file names are ignored by
OS/2.  It believes that "foo" and "foo." are different files, a belief
it probably shares with quite a few OS/2 users.


Long file names
---------------

If you are using Novell Netware volumes which don't support long file
names, you have to set the `force-fat-regexp' variable to make
auto-saving and backup files work on such volumes.  The value of
`force-fat-regexp' should be a regular expression matching path names
on such volumes.  Letter case is ignored.  Example:

  (setq force-fat-regexp "^[xyz]:")

This example turns off long file names for drives X, Y and Z.  If you
are using UNC paths to volumes which don't support long file names,
you should set `force-fat-regexp' such that these UNC paths are also
matched.  Example:

  (setq force-fat-regexp "^[xyz]:\\|^//server/vol1")


Choosing a PM font
==================

A font is specified by size (printer's points), simulated appearance
(bold or italic, optional) and name:

  SIZE[.bold][.italic].NAME

Alternatively, you can use the `Host Portable Character
Representation' for font names, for instance

  -*-Courier-medium-r-normal--*-100-*-*-m-*-cp850

Examples of fixed-spaced bitmap fonts:

  8.Courier
  10.Courier
  10.System Monospaced
  12.bold.Courier                 (Simulated bold font)
  12.Courier Bold                 (Real bold font)
  8.System VIO                    (OS/2 2.1 and later)
  6.Small                         (see below)

As the plain, bold, and italic variations of the PM fonts have
different character widths, mixing fonts in a frame isn't a good
idea.  The character widths of all fonts are forced to the character
width of the default font.  When defining a face with a font which is
wider than the default font, there will be problems: some characters
will be displayed only partially and characters may overlap.  Fonts
which are smaller than the default font, however, can be used without
problems.  For instance, you can use "8.bold.System Monospaced" as
bold font when using "10.Courier" as default font ("10.bold.Courier"
is too wide).  Using italic fonts is not recommended.

Simulated italic fonts are much slower than real italic fonts.  Only
"12.Courier Italic" and "12.Courier Bold Italic" are real italic
fixed-width bitmap fonts.

The smallest fixed-width VGA bitmap font of OS/2 2.0 ("8.Courier") is
rather big.  A small font ("6.Small") is available for anonymous ftp:

  ftp.uni-stuttgart.de: pub/systems/os2/emacs-19/contrib/small.zip

Unfortunately, the first release of that font (smallfnt.zip) has a bug
in the font metrics: the maximum ascender height is wrong.  This bug
has been fixed on 15-Jun-1992, but the old version of small.fon is
still widely available.  After unpacking and before installing
small.fon, you should use the following command to fix that bug:

  patch \emacs\19.30\emx\small.pat /a

Use the OS/2 program named PATCH.EXE, not the Unix tool of the same
name.  If the patch cannot be applied, you probably have a fixed
version.

Using outline fonts (such as "9.Courier") is not recommended because
that's too slow.  Proportional fonts (such as "10.Tms Rmn") cannot be
used.

To set the default font of a frame, set the `font' frame parameter.
Example:

  (setq default-frame-alist
        (append '((font . "8.Courier")) default-frame-alist))

If the font does not exist, "10.Courier" is used instead as default
font.  If you use the `Host Portable Character Representation' for the
name of the default font, Emacs automatically chooses (simulated) bold
and italic variants of that font.  Example:

  emacs -pm -fn -*-Courier-medium-r-normal--*-100-*-*-m-*-cp850

You can use a popup menu to select the default font: Click mouse
button 1 (that's the left mouse button, by default) while depressing
the SHIFT key (S-down-mouse-1).  The menu contains all fixed-width
bitmap fonts of OS/2 2.1 (and later), plus "6.Small".

To change the font of a face, use set-face-font.  However, you can use
only fonts reported by the pm-list-fonts function.  Examples:

  (set-face-font 'bold "10.bold.Courier")
  (set-face-font 'italic "10.italic.Courier")  ; NOT RECOMMENDED!

To set the font for menus, set the `menu-font' frame parameter.  Only
SIZE.NAME format is allowed for the value of the `menu-font' frame
parameter.  Example:

  (setq default-frame-alist
        (append '((menu-font . "8.Helv")) default-frame-alist))

If the font does not exist, the system default is used.


The keyboard
============

In text mode, the ALT keys generate the A- modifier (alt).  Load
emx-meta.el to use the ALT keys to generate the M- modifier (meta):
Put

  (load "emx-meta.el")

into your .emacs or site-start.el file.  This works only for a subset
of the keys.  It does not work with the CTRL key.

The rest of this section applies to PM mode.

The modifiers generated by the ALT keys are configurable.  There are
two ALT keys, the left ALT key and the right ALT key.  The right ALT
key is called AltGr or AltCar on most non-US keyboards.  On these
keyboards, the right ALT key is used for entering special symbols.  On
the US keyboard, the right ALT key is equivalent to the left ALT key.

We'll use the term `ALT key' for both ALT keys of the US keyboard.
For keyboards which have an AltGr or AltCar key, we'll call the left
ALT key `ALT key' and the right ALT key `ALTGR key'.

The modifier for the ALT key (both ALT keys on the US keyboard, that
is) is set with the `alt-modifier' frame parameter.  For instance, use
the following code to use the ALT key for generating the A- (alt) modifier:

  (setq default-frame-alist
        (append '((alt-modifier . alt)) default-frame-alist))

By default, the ALT key is used for generating the M- (meta)
modifier.

The modifier for the ALTGR key (which isn't present on the US
keyboard) is set with the `altgr-modifier' frame parameter.  For
instance, use the following code to use the ALTGR key for generating
the A- (alt) modifier:

  (setq default-frame-alist
        (append '((altgr-modifier . alt)) default-frame-alist))

As ALTGR is treated specially by the operating system, you cannot use
it with arbitrary keys.  Usually you can use it together with a subset
of the letter and digit keys to generate the modifier set with
altgr-modifier.  If the CTRL key is down, ALTGR is ignored for most
keys.

Suppose that '((alt-modifier . meta) (altgr-modifier . hyper)) is in
effect.  Then, you'll get the following table of keys vs. events:

  Left ALT ³ Right ALT ³ CTRL ³ Key ³³ US keyboard ³ German keyboard
  ÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÅÄÄÄÄÄÅÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
     X     ³     -     ³  -   ³  a  ³³   M-a       ³   M-a
     X     ³     -     ³  X   ³  a  ³³   M-C-a     ³   M-C-a
     -     ³     X     ³  -   ³  a  ³³   M-a       ³   H-a
     -     ³     X     ³  X   ³  a  ³³   M-C-a     ³   C-a
     -     ³     X     ³  -   ³  f2 ³³   M-f2      ³   f2
     -     ³     X     ³  -   ³  q  ³³   M-q       ³   @
     -     ³     X     ³  -   ³  q  ³³   M-C-q     ³   C-@

The locations of the keys C-[ C-] C-\ etc. on non-US keyboards depend
on whether you are using the PM version or the text mode version of
Emacs: With the PM version, you can type those keys with
CTRL+ALTGR+<whatever> (example: C-] is on CTRL+ALTGR+<9> of the German
keyboard), where ALTGR is the right ALT key.  With the text mode
version, pretend that you have a US keyboard (example: C-] is on
CTRL+<+> of the German keyboard).

If you want to bind keys depending on the keyboard layout, use the
keyboard-type function.


Changing the window size
========================

To change the window size in text mode, type

    mode co80,x

where x is the number of lines.  Example: mode co80,40

To change the window size in PM mode, simply resize the window using
the mouse or the keyboard (Alt+F8).  You can set the default size with
the `width' and `height' frame parameters in site-init.el or .emacs:

  (setq default-frame-alist
        (append '((width . 80) (height . 40))
                default-frame-alist))

You can set the default position with the `top' and `left' frame
parameters.  See the documentation of set-frame-position for details.


Choosing the backup type
========================

You might want to use

  (setq backup-by-copying t)

This has two advantages under OS/2:

-  the letter case of the name of the file is retained (normally, GNU
   Emacs for emx uses lower-case file names unless the variable
   `case-fold-file-names' is set to `nil').  Letter case is also
   retained if `preserve-file-name-case' is set to t (experimental
   feature).

-  when editing .CMD files, the Workplace Shell does not change
   program objects to point to the backup of the edited file

There is one known disadvantage under OS/2:

-  the letter case of the file name is lost for the backup file
   (unless `case-fold-file-names' is `nil' or
   `preserve-file-name-case' is t)

If `case-fold-file-names' is t and `preserve-file-name-case' is nil
you can choose by setting `backup-by-copying': Either keep the letter
case of the file name of the new file or of the backup file.


Text mode vs. binary mode
=========================

This port of GNU Emacs supports two types of files: binary files and
text files.  As GNU Emacs is a text editor, you'll work with text
files most of the time.  Therefore, you don't have to know the ugly
details unless you want to edit a binary file.

When reading a text file, each CR/LF pair is converted to a LF.  If
the last character of the file is a Ctrl-Z, that character is
removed.

When writing a text file, each LF is replaced with a CR/LF pair.  A
Ctrl-Z is not appended as that has been obsolete for years.

No conversion is done when reading or writing a binary file.

The emx-add-binary-mode function is used to define an additional
regular expression for files which should be read and written in
binary mode.  Example:

  (emx-add-binary-mode "\\.exe$")
  (emx-add-binary-mode "\\.gz$")
  (emx-add-binary-mode "\\.[Zz]$")

This example will make Emacs use binary mode for file names ending
with .exe, .gz, .z or .Z.  Initially, binary mode is used for file
names matching the following regular expressions:

  \.elc$          \.arc$
  \.tar$          \.lzh$
  \.gz$           \.zip$
  \.[zZ]$         \.zoo$
  \.tgz$

You can use emx-remove-binary-mode to remove an entry from the list of
regular expressions for identifying binary files.  For instance,

  (emx-remove-binary-mode "\\.[Zz]$")

cancels

  (emx-add-binary-mode "\\.[Zz]$")

Note that the spelling of the regular expression must exactly match
the spelling of the regular expression to be removed.

The buffer-local variable emx-binary-mode controls whether to use text
mode or binary mode.  If the variable is nil (which is the initial
value), text mode is used.  If the variable is t, binary mode is used.

When inserting a binary file (i.e., a file whose name matches one of
the regular expressions defined by emx-add-binary-mode) into a buffer,
emx-binary-mode is set to t.  The value of emx-binary-mode of that
buffer will stay t until changed.  This also applies to visiting a
file.  In other words, a buffer is switched to binary mode when
visiting or inserting a binary file.  A file is read in binary mode if
the target buffer is in binary mode or if the file is a binary file.

When writing a file (e.g., by saving the buffer or by calling
write-region), binary mode is used if the source buffer is in binary
mode or if the file is a binary file (i.e., the name matches one of
the regular expressions defined by emx-add-binary-mode).  The
emx-binary-mode variable of the buffer is set temporarily while
writing the file and reverts to the previous value after writing the
file.

To insert a text file into a buffer which is in binary mode, manually
set the emx-binary-mode variable to nil.

You can use find-file-binary to visit a file in binary mode.


Code pages
==========

cp850.el, which is loaded by default, defines a syntax table and a
case table for code page 850.

To enter accented characters which are not supported by your keyboard,
load cp850acc and invoke cp850-accents-mode.

Emacs uses the default code page for keyboard input and for display.
Use the current-code-page function to get the current code page.  The
list-code-pages function returns a list of available code pages.

Use the set-code-page command to set the code page for keyboard input
and for display.  Note that the process code page is not changed;
therefore set-code-page does not affect translation of file names and
the code page of child processes.  Moreover, the syntax tables and
case translation tables of Emacs are not affected by set-code-page.

In PM mode, there are additional code pages available, such as 1004
(Windows) and several EBCDIC code pages.  Better don't use the EBCDIC
code pages, because Emacs talks ASCII.  All buffers, windows, and
frames share the same code page.  Note that the `cp850' part of font
names is ignored; the current code page is used for all fonts.


Scroll bars
===========

GNU Emacs for OS/2 now supports vertical scroll bars.  The scroll bar
code has been contributed by Patrick Nadeau (pnadeau@footprint.com).

The scroll bars work (nearly) like PM scroll bars.  All mouse buttons
generate a mouse-1 event, shift keys are ignored.

There is one important difference to PM scroll bars: The scroll bars
are `character oriented', not `line oriented'.  The position and size
of the slider is based on character counts, not on line counts: For
instance, the size of the slider depends on line lengths.

The scroll bars have a few known anomalies; please don't report these
as bugs.


Using shell mode
================

GNU Emacs uses the shell (command processor) pointed to by the SHELL
environment variable.  I recommend using a Unix-like shell, like bash
or the Data Logic shell, which are available for anonymous ftp:

  ftp-os2.cdrom.com: /pub/os2/shellutl/bash_112.zip
  ftp-os2.cdrom.com: /pub/os2/shellutl/ms_sh23b.zip  (or later)

To run an OS/2 command prompt (using cmd.exe as shell) in an Emacs
window, use the cmd command defined in emx-cmd.el.


Using the clipboard
===================

To use the OS/2 clipboard, the following functions are provided:

  Function ³ Default key ³ Description
  ÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  pm-copy  ³ C-insert    ³ Copy the region to the clipboard
  pm-cut   ³ S-delete    ³ Copy the region to the clipboard,
           ³             ³ then delete the region
  pm-paste ³ S-insert    ³ Paste text from the clipboard at point

Note that several OS/2 programs cannot handle more than 64KB of text
in the clipboard.  Therefore you should avoid copying more than 64KB
of text.

You can let the Cut, Copy, and Paste choices of the Edit menu of the
menu bar use the clipboard.  This is done by calling the pm-edit-menu
function, as done by the default site-init.el file.  If you want the
original Edit menu, remove the invocation of pm-edit-menu from
site-init.el.


Using emacsclient
=================

emacsclient has two new command line options:

  -s   Don't switch the focus back to emacsclient when saying `Done'
       for a buffer (C-x #).  This option is ignored if -w is used

  -w   Don't wait for saying `Done' (C-x #)

When using emacsclient as default OS/2 editor (by associating it with
various file types as explained in the OS/2 documentation), you should
use either the -s or the -w option.


Using ange-ftp
==============

ange-ftp is a Lisp package for remote editing of files using ftp.
To prepare for ange-ftp, choose a temporary directory and set the
ange-ftp-tmp-name-template variable.  To put temporary files in
directory, say, c:\tmp, add

  (setq ange-ftp-tmp-name-template "c:\\tmp\\af")

to your .emacs or site-start.el file.  Backslashes are required due to
a bug in certain versions of IBM's ftp.exe; backslashes have to be
typed twice in Lisp strings.

ange-ftp requires Holger Veit's xf86sup.sys driver (see above).  Note
that there are a lot of different versions of ftp.exe from IBM, all
having different bugs.  ftp.exe of the Internet Access Kit seems to
work; its banner line is:

  IBM TCP/IP for OS/2 - FTP Client ver 09:44:28 on Mar 04 1994

Most other versions of ftp.exe don't work.

To edit a file on a remote host, use the following syntax for
file names:

  /HOST:FILENAME
  /USER@HOST:FILENAME

For now, drive letters on the remote host are not supported, that
is, ange-ftp can be used with Unix hosts only.

ange-ftp-kill-ftp-process does not work; to kill an ftp process,
select its buffer and type the ftp command `quit'.

If ange-ftp does not work for you, make sure that you are using
xf86sup.sys (the value in the `Tty' column in the *Process List*
buffer created by the `list-processes' command must not be `(none)').
If ange-ftp still does not work, try to get a working version of
ftp.exe.


Using Ispell
============

You can get an emx port of the spelling checker Ispell by anonymous
ftp:

  ftp-os2.cdrom.com: /pub/os2/editors/isp31b2.zip

It is no longer required to patch ispell.el of isp31b2.zip -- you
should use the ispell.elc file that comes with GNU Emacs.  To use
Ispell, add the following statement to your .emacs or site-start.el
file, using correct pathnames:

---------------------------------------------------------------------
(setq ispell-program-name "c:/usr/ispell/ispell.exe")
---------------------------------------------------------------------


Using AUC TeX
=============

AUC TeX is an integrated environment for editing LaTeX and TeX files.

0. You can get the most recent version of AUC TeX by anonymous ftp:

     ftp.iesd.auc.dk: /pub/emacs-lisp/auctex.tar.gz

1. Unpack the AUC TeX files (of auctex-9.2a.tar.gz or later) into
   \emacs\auctex

2. Modify tex-site.el by copying the following Emacs Lisp code to
   tex-site.el.  Some of the variables need customization: Modify the
   variable `TeX-lisp-directory' to point to the directory where you
   have put the AUC TeX files.  Modify the variable `TeX-macro-global'
   to point to the TeX inputs directory.  Modify `emx-TeX-command' if
   you do not use tex386 or if you want to use command line options
   such as `-mt16000' for all invocations of TeX.  Add your printer to
   `TeX-printer-list'.  Modify `LaTeX-command-style' for your LaTeX
   format files.  For instance, you can insert command line options
   such as `-mt16000' before the `&' character.

   Alternatively, you can set `LaTeX-command-style' as indicated in
   tex-site.el if you prefer to invoke TeX by running batch files such
   as latex.cmd.

---------------------------------------------------------------------
(setq emx-TeX-command "tex386")
(setq TeX-shell (if (eq emx-system-type 'os2) "cmd.exe" "command.com"))
(setq TeX-lisp-directory "c:/emacs/auctex/")
(setq TeX-macro-global '("c:/emtex/texinput/"))
(setq TeX-print-command "prthplj %s")
(setq TeX-printer-list '(("lj" "prthplj %s")
                         ("fx" "prtfx %s")
                         ("ps" "dvips -o lpt1 %s")))
(setq TeX-view-style
      (list (list "." (if (eq emx-system-type 'os2)
                          "vp %d" "v %d"))))
(setq TeX-command-list
      (list (list "TeX" "tex386 \\nonstopmode\\input %t" 'TeX-run-TeX nil t)
            (list "TeX Interactive" "tex386 %t" 'TeX-run-interactive nil t)
            (list "LaTeX" "%l \\nonstopmode\\input{%t}" 'TeX-run-LaTeX nil t)
            (list "LaTeX Interactive" "%l %t" 'TeX-run-interactive nil t)
            (list "LaTeX2e" (emx-make-TeX-command
                             "&latex \\nonstopmode\\input{%t}")
                  'TeX-run-LaTeX nil t)
            (list "View" "%v " 'TeX-run-background t nil)
            (list "Print" "%p " 'TeX-run-command t nil)
            (list "BibTeX" "bibtex %s" 'TeX-run-BibTeX nil nil)
            (list "Index" "makeindx %s" 'TeX-run-command nil t)
            (list "Check" "lacheck %s" 'TeX-run-compile nil t)
            (list "Spell" "<ignored>" 'TeX-run-ispell nil nil)
            (list "Other" "" 'TeX-run-command t t)
            ;; Not part of standard TeX.
            (list "Makeinfo" "makeinfo %t" 'TeX-run-compile nil t)
            (list "AmSTeX" "tex386 ^&amstex \\nonstopmode\\input %t"
                  'TeX-run-TeX nil t)))

(setq LaTeX-command-style
      (mapcar (function (lambda (arg)
                          (list (car arg)
                                (emx-make-TeX-command (nth 1 arg)))))
              '(("^ams" "&amslatex")
                ("^foils$" "&foiltex")
                ("^slides$" "&splain")
                ("^plfonts\\|plhb$" "&platex")
                ("." "&lplain"))))
---------------------------------------------------------------------

3. Change to the directory \emacs\auctex and run instauctex:

     cd \emacs\auctex
     instauctex

   The instauctex script assumes that the command `emacs' runs
   emacs.exe.  It does not work with emacs.cmd, for instance, if you
   happen to have such a thing in your PATH.  instauctex is designed
   for AUC TeX 9.2a.

4. Add the following lines to your .emacs or site-start file:

     (setq load-path (append '("c:/emacs/auctex") load-path))
     (setq Info-default-directory-list
           (append Info-default-directory-list
                   '("c:/emacs/auctex/doc")))
     (require 'tex-site)

   If you have set the INFOPATH environment variable, add
   c:/emacs/auctex to INFOPATH.

5. Add the following line to the `dir' file in \emacs\19.30\info or to
   your private `dir' file:

     * AUC TeX: (auctex).  A much enhanced LaTeX mode for GNU Emacs.

6. Kill and restart GNU Emacs.


Receiving and sending mail
==========================

You can receive and send mail with IBM TCP/IP 2.0 for OS/2 or the
Internet Access Kit of OS/2 3.0.


1. Common actions
-----------------

These instructions assume that TCP/IP or the Internet Access Kit has
been installed in directory c:\tcpip, and GNU Emacs is installed in
directory c:\emacs\19.30.

- If you already have a sendmail.cf (in directory c:\tcpip\etc), you
  might want to use that file, replacing the line starting with
  `Mlocal' as shown below

- If you are using a LAN connection and want to receive and send mail
  via SMTP, you should use the sendmail.cf file that came with TCP/IP
  and perform the following changes:

  - Adjust the host name (Dw and Cw commands)

  - Adjust the domain name (DD command)

  - Add

      # errors: mail
      Oem

    after the heading

      ###############
      #   Options   #
      ###############

    That option makes sendmail mail back errors.

- If you want to use a POP3 server for receiving mail and as relay for
  outgoing mail (highly recommended when connected via SLIP or PPP),
  you should copy the file c:\tcpip\etc\sendmail.uml of the IAK to
  c:\tcpip\etc\sendmail.cf and perform the following changes:

  - Replace YourMailRelay with the unqualified (domain-less) name of the
    mail relay (POP server)

  - Replace Your.Mail.Hub with the fully-qualified domain name of the
    mail hub

- If you don't have sendmail.uml and want to use a POP3 server for
  receiving mail and as relay for outging mail, copy the file
  c:\emacs\19.30\emx\sendmail.rly to c:\tcpip\etc\sendmail.cf and
  perform the following changes in the copy:

  - Replace LOCALHOST.DOMAIN with the fully-qualified domain name of
    your workstation

  - Replace POPHOST.DOMAIN with the fully-qualified domain name of the
    mail relay (POP server)

  - Replace HUB.DOMAIN with the fully-qualified domain name of the
    mail hub


2. Actions specific to the protocol and mailbox format
------------------------------------------------------

Choose one of the following three installation variants.


2.1. Receiving mail via SMTP, storing messages in Unix mailbox format
---------------------------------------------------------------------

Using Unix mailbox format has the advantage of having multiple user
names for mail on your machine.

- Create a mail spool directory (for instance, c:\tcpip\spool\mail)

- Replace the line of sendmail.cf that starts with `Mlocal' with

    Mlocal, P=c:/emacs/19.30/bin/deliver.exe, F=lsDFMP, S=10, R=20,
    		A=deliver -Dc:/tcpip/spool/mail -M $u

  Update the pathname deliver.exe and the pathname of the spool
  directory (-D option after A=)

- Set the following variables in your .emacs file:

    (setq rmail-spool-directory "c:/tcpip/spool/mail/")
    (let ((mbox (concat rmail-spool-directory (user-login-name))))
      (setq display-time-mail-file mbox)
      (setq rmail-primary-inbox-list (list mbox)))


- Create a file named `deliver.usr' in the directory pointed to by
  the ETC environment variable.  Enter all valid user names on your
  machine, one per line.  Don't forget to enter special accounts such
  as `postmaster' and `root'.  If you want to receive mail addressed
  to any user, type a line containing nothing but one asterisk.

  Instead of `deliver.usr' in the directory pointed to by ETC, you
  can use any file, if you set the environment variable DELIVER.USR
  to the path name of the file.


2.2. Receiving mail via SMTP, storing messages in LaMail format
---------------------------------------------------------------

Using LaMail format has the advantage of being able to use LaMail.

- Create a mail spool directory (for instance, c:\tcpip\etc\mail)

- Replace the line of sendmail.cf that starts with `Mlocal' with

    Mlocal, P=c:/emacs/19.30/bin/deliver.exe, F=lsDFMP, S=10, R=20,
    		A=deliver -Dc:/tcpip/etc/mail -L $u

  Update the pathname of deliver.exe and the pathname of the spool
  directory (-D option after A=)

- Set the following variables in your .emacs file:

    (setq rmail-spool-directory "c:/tcpip/etc/mail/")
    (let ((mbox (concat rmail-spool-directory "inbox.ndx")))
      (setq display-time-mail-file mbox)
      (setq rmail-primary-inbox-list (list mbox)))



2.3. Receiving mail from a POP3 server
--------------------------------------

- Create a mail spool directory (for instance, c:\tcpip\spool\mail)

- Set the following variable in your .emacs file:

    (setq rmail-spool-directory "c:/tcpip/spool/mail/")
    (let ((mbox (concat rmail-spool-directory "poppoll")))
      (setq display-time-mail-file mbox)
      (setq rmail-primary-inbox-list (list mbox)))

- Enter the name and IP address of the POP server in the file
  c:\tcpip\etc\hosts.  Otherwise, poppoll.exe may crash due to a bug
  in IBM's TCP/IP when the connection to the name server breaks down

- After starting TCP/IP, run

    poppoll -bfs -i5m <user>@<host> c:\tcpip\spool\mail\poppoll

  where <host> is the name of the POP3 server and <user> is the name
  of the mailbox on the POP3 server


3. Conclusion
-------------

To get your full name into the From: field of outgoing messages, set
the environment variable USERFULLNAME to your full name.  You can use
the mail-from-style variable for controlling the style of the From:
field.

For receiving mail by SMTP, you have to start sendmail in server mode:

  sendmail -bd -q15m

When using the IAK, this should be done after dialing.  When using
TCP/IP 2.0, this is perhaps already done by tcpstart.cmd.  The -q
option specifies how often the mail queue (for outgoing mail) should
be inspected: -q15m causes this to be done every 15 minutes.  If
sendmail is already running, stop it with Ctrl-C and restart it to
effect the new sendmail.cf settings.

Terminate and restart GNU Emacs to effect the changes to .emacs.

If you want a mailbox icon which raises a flag when new mail has
arrived, try

  ftp-os2.cdrom.com: /pub/os2/network/tcpip/pmbiff12.zip

You can find additional information on deliver.exe, movemail.exe, and
poppoll.exe in deliver.doc, movemail.doc, and poppoll.doc,
respectively, in directory \emacs\19.30\emx.


Reading and posting news
========================

Type `M-x gnus RET' to start the Gnus newsreader.  See the on-line
documentation for details (`C-h i m gnus RET').


Removing the VIO window from the Window List
============================================

Call the remove-from-window-list function to remove the session in
which emacs.exe is running (a VIO window, usually) from the Window
List.  The advantage of this is having fewer entries in the Window List
-- it will be simpler to locate the PM windows of Emacs.

On the other hand, double-clicking on the Emacs icon will start
another instance of Emacs instead of bringing the current instance to
the foreground.

You should not call remove-from-window-list when running Emacs
manually (not by double-clicking on the Emacs icon) or when using
Emacs in text mode (without the -pm option).

If you created your Emacs icon using instemacs.cmd without the
`keepvio' option, calling remove-from-window-list is not necessary.
The Emacs icon starts emacs.exe in a PM session so that it doesn't
appear in the window list anyway.

Instead of calling remove-from-window-list, you might want to call
pm-session-bond with a non-nil argument (t, for instance) to establish
a bond between emacs.exe (the VIO window) and pmemacs.exe (the PM
windows).  If you select emacs.exe, for instance by double clicking
the Window List, one of the PM windows will be selected instead of
emacs.exe.  After establishing the bond, you can select emacs.exe by
clicking on the titlebar, by using the `Tile' or `Cascade' choice of
the Window List, or by using the `Restore' choice of the Minimized
Window Viewer.  You can break the bond by calling pm-session-bond with
a nil argument.

Note: By default, site-start.el calls pm-session-bond to establish a
bond between emacs.exe and pmemacs.exe.


More environment variables
==========================

The user-name variable is initialized from the value of the USER
environment variable.  If USER is not set, the LOGNAME environment
variable is used.  If both USER and LOGNAME are not set, user-name is
set to "unknown".

The user-full-name variable is initialized from the value of the
USERFULLNAME environment variable.  If USERFULLNAME is not set,
user-full-name is set to "unknown".


Printing the manual
===================

Do you really want to print it?  It's 474 pages and does not contain
more information than the on-line manual.  Here's how to print the
manual:

1. Get and install emTeX (see the emx documentation for ftp locations)

2. Get and install the gnuinfo.zip package for emx 0.9b

3. Unpack e30man (see above)

4. Typeset the manual:

     cd \emacs\19.30\man
     texi2dvi emacs.texi

5. Print the manual (this example is for the HP LaserJet).  See the
   dvidrv documentation on how to print on both sides of the paper:

     cd \emacs\19.30\man
     prthplj emacs


Miscellaneous hints
===================

-   For best results, run emacs.exe from the drive where it is
    installed -- you can change the drive in GNU Emacs.  If you run
    Emacs from a drive different from the drive where it is installed,
    you'll get the benign warning message

      Warning: lisp library (/emacs/19.30/lisp) does not exist.

    Ignore this message.

-   Emacs is designed to be started once and never terminated.
    Therefore, you should add Emacs to the startup folder (use the
    startup option of instemacs.cmd) and never start it manually.  If
    you want to enter an OS/2 command to edit a file, use
    emacsclient.

-   To change the cursor size in text mode, put

      cursor -80 -100

    into a batch file which runs emacs.exe (unfortunately, cmd.exe
    changes the cursor size when displaying a prompt).  Negative
    cursor command line arguments are percentages -- the above example
    makes the cursor use the bottom 20% of the character cell.

-   The character `-' is not allowed in filenames on CDROM, `_' is
    used instead.  To let `load' automatically turn `-' into `_' and
    try again if a file is not found, set emx-cdrom-load to t.  When
    pre-installing Emacs on CDROM, it should be dumped with
    emx-cdrom-load set to t.

-   Don't put .el files into \emacs\19.30\lisp -- you'll have to move
    them when upgrading Emacs.  Instead, create a new directory, say

      \emacs\locallisp

    and add it to `load-path'.  This also applies to .info files.


Additional features of GNU Emacs 19.30 for emx
==============================================

Additional functions (see on-line help for details):

  current-code-page
  emacs-priority
  emx-add-binary-mode
  emx-remove-binary-mode
  emx-original-file-name
  file-name-valid-p
  filesystem-type
  get-ea
  get-ea-list
  get-ea-string
  keyboard-type
  list-code-pages
  pm-file-dialog
  pm-session-bond
  put-ea
  put-ea-list
  put-ea-string
  remove-ea
  remove-all-eas
  remove-from-window-list
  set-code-page

Additional variables (see on-line help for details):

  binary-process-input
  binary-process-output
  case-fold-file-names
  emx-binary-mode
  emx-binary-mode-list
  emx-kill-tree
  emx-start-session
  emx-system-type
  min-skip-run
  pm-align-menu-key-descriptions
  pm-popup-menu-align-top
  pm-color-alist
  preserve-file-name-case
  process-priority
  program-name-handler-alist

Additional command line options for PM:

  -pm                   Use windowing system
  -name NAME            Set name of frame (displayed in the titlebar)
  -font FONT            Select font
  -background COLOR     Select default background color
  -foreground COLOR     Select default foreground color
  -T NAME               See -name
  -fn FONT              See -font
  -fg COLOR             See -foreground
  -bg COLOR             See -background

Example:

  emacs -pm -fg white -bg os2darkblue -fn 8.Courier myfile.c

Fonts:

  A font is specified by size (printer's points) and name; see above.

Colors:

  See pm-color-alist in term/pm-win.el

Additional frame parameters for modify-frame-parameters and
default-frame-alist:

  Frame parameter  ³ Type    ³ Default    ³ Description
  ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ
  name             ³ String  ³            ³ Window title
  font             ³ String  ³"10.Courier"³ Default font of frame
  menu-font        ³ String  ³ nil        ³ Font for menus
  background-color ³ String  ³ "white"    ³ Default background color
  foreground-color ³ String  ³ "black"    ³ Default foreground color
  alt-modifier     ³ Symbol  ³ meta       ³ Modifier generated by left Alt key
  altgr-modifier   ³ Symbol  ³ alt        ³ Modifier generated by AltGr key
  cursor-type      ³ Symbol  ³ box        ³ Cursor type
  cursor-blink     ³ Boolean ³ t          ³ Blinking cursor
  shortcuts        ³ List    ³ nil        ³ Disable F1, F10, A-f4, A-SPC etc.
  mouse-buttons    ³ String  ³ "132"      ³ Swap mouse buttons
  height           ³ Integer ³ 25         ³ Height of window, in lines
  width            ³ Integer ³ 80         ³ Widtht of window, in columns
  left             ³ Integer ³            ³ horizontal position, in pixels
  top              ³ Integer ³            ³ vertical position, in pixels

The value of a frame parameter of type Boolean should be either `t' to
enable the feature or `nil' to disable the feature.

Menu font:

  You can select the font to be used in menus with the menu-font frame
  parameter.  The value is either `nil' or a string "SIZE.NAME".
  `nil' is the default and selects the system default.  To choose a
  different font, use "SIZE.NAME", where SIZE is the size of the font
  in printer's points and NAME is the name of the font.  Example:
  "5.Small".  If the font does not exist, the system default will be
  used.

Alt modifiers:

  alt           The ALT key generates the A- modifier
  meta          The ALT key generates the M- modifier
  hyper         The ALT key generates the H- modifier
  super         The ALT key generates the s- modifier

Cursor types:

  bar            A thin vertical bar (using the system default width)
  (bar . WIDTH)  A vertical bar, WIDTH pixels wide
  box            A filled box (default)
  frame          The outline of a box
  underline      A horizontal line below the characters
  halftone       A filled box (gray)

Shortcuts:

  The Presentation Manager uses the keys F1, F10, Alt, AltGr,
  Alt+Space, and Alt+F4 through Alt+F11 as accelerator keys
  (shortcuts).  By default, Emacs disables those keys, making them
  available for binding them to Emacs commands.  (The default
  site-start.el file, however, enables the Alt+F4 shortcut for closing
  the frame.)

  If you want to use Alt+F7 for moving a frame, F10 for selecting the
  menubar, etc., you have to restore the original meaning of those
  keys with the `shortcuts' frame parameter.

  The argument of `shortcuts' is either nil (all accelerator keys are
  disabled -- this is the default), t (all accelerator keys are
  enabled), or a list of keys to be enabled (all other accelerator
  keys are disabled).  To disable the accelerator keys Alt and AltGr
  (which can be quite annoying) while keeping all other accelerators,
  use the following cons (pair) in the list of frame parameters:

        (shortcuts . (f1 f10 alt-space alt-f4 alt-f5 alt-f6
                      alt-f7 alt-f8 alt-f9 alt-f10 alt-f11))

  Note that `alt' and `altgr' are missing in the list.

Mouse buttons:

  The argument of the mouse-buttons parameter is a string of 3
  characters.  The first character defines the event generated by the
  left mouse button, the second character defines the event generated
  by the middle mouse button (which doesn't exist on two-button mice),
  the third character defines the event generated by the right mouse
  button.  Each character is either 1 (mouse-1), 2 (mouse-2), 3
  (mouse-3) or a space (no event).  The default is "132", according to
  OS/2 conventions.  With this value, a two-button mouse cannot
  generate a mouse-3 event.

Example:

  (setq default-frame-alist
        (append '((background-color . "os2darkblue")
                  (foreground-color . "white")
                  (alt-modifier . alt)
                  (altgr-modifier . hyper)
                  (font . "8.Courier")
                  (menu-font . "8.Helv")
                  (mouse-buttons . "123")
                  (shortcuts . (alt-f4 alt-space)))
                default-frame-alist))


Missing features, misfeatures, bugs
===================================

- The emacs-priority variable is ignored.  Use the emacs-priority
  function instead.  Note that lisp/term/pm-win.el calls
  emacs-priority.

- interrupt-process doesn't work unless the process is an immediate
  child of Emacs or is an emx program.  Therefore,
  comint-interrupt-subjob (C-c C-c) doesn't work.

- The timestamps of most events are always 0.  For some events, the
  timestamp is misused for internal purposes.  The timestamp is valid
  only for mouse button events.

- Several functions specific to X Windows are missing.

- OS/2 does not support all three-button mice.  Therefore, you can use
  only two buttons with certain mice.  RODENT.SYS, a shareware mouse
  driver written by Michael Lee Finney (m.finney@genie.geis.com)
  supports additional three-button mice.  Look for RODENT.ZIP or
  RODNT100.ZIP.  Unfortunately, the registration cost is likely to
  exceed the cost of a new mouse...

- Emacs doesn't know that trailing dots in file names are ignored by
  OS/2.  It believes that "foo" and "foo." are different files, a
  belief it probably shares with quite a few OS/2 users.

- Emacs' client windows are not repainted while a popup menu is active.

- Coordinates reported for mouse events and used by x-popup-menu are
  character coordinates, not pixel coordinates.  However, characters
  are of size 1 by 1.  In consequence, menus usually appear in the
  correct location.

- OS/2's standard file dialog rejects file names starting with a dot.

- OS/2 does not pass M-Home (Alt+Home) to applications.

- File names containing blanks cannot be used with emacsclient.

- See the `Scroll bars' section for information on scroll bars.

- See the `Using ange-ftp' section for information on ange-ftp.


Compiling GNU Emacs
===================

The following programs are required for compiling GNU Emacs 19 for emx:

  - dmake 3.8

  - emx 0.9b, GCC 2.7.2 (or later), etc. for emx

  - GNU Bison 1.19 (or later)

  - GNU sed 1.16 (or later, with the exception of version 2.04)

  - cat (GNU text utilities 1.9 or later)

  - cp, mv, rm, chmod (GNU file utilities 1.4 or later)

You can find all these programs on ftp.leo.org, somewhere under
/pub/comp/os/os2.

To compile GNU Emacs, you have to install the source code:

  cd \
  unzip a:e30src

To compile GNU Emacs, type

  cd \emacs\19.30
  configure
  cd lib-src
  make
  cd os2
  make
  cd ..\..\src
  make

If emx-patch.el and emx-funcs.el have not been byte-compiled
(emx-patch.elc and emx-funcs.elc don't exist), the message

  Pure Lisp storage exhausted

may be displayed in the make step in the src directory.  Type

  temacs -batch -l emx-bc

to byte-compile these files.  Ignore the warning messages which start
with **.  Then, restart make.  IMPORTANT: emx-bc.el assumes that the
.el files are in ../lisp.

Before running the new emacs.exe in \emacs\19.30\src, you should type

  xcopy ..\etc\DOC ..\data\

To install GNU Emacs in \emacs\19.30\bin, run install.cmd.

If the GNU Emacs version number changes (e.g., from 19.83 to 19.84)
you have to edit the following files, replacing the old version number
with the new one:

  emx/FAQ
  emx/README
  emx/emx1.sed
  emx/emx4.sed
  src/dist.cmd
  src/install.cmd

To debug GNU Emacs, type

  gdb -s temacs -e emacs.exe
  source .gdbinit
  set args -pm

Note that .gdbinit changes the command line arguments.  Therefore, you
should use `set args' after loading .gdbinit.

To do post-mortem debugging, type

  gdb -s temacs -e emacs.exe -c core

Note that emx.dll versions prior to revision index 14 don't create
usable core dump files for emacs.exe: the stack object is missing in
the core dump.

To make new distribution ZIP files, type

  cd \emacs\19.30\src
  install
  dist
  cd ..\emx
  make-dist


Who did the emx port of GNU Emacs 19?
=====================================

  Eberhard Mattes
  Teckstraáe 81
  D-71696 M”glingen
  Germany

  Internet: mattes@azu.informatik.uni-stuttgart.de

No telephone calls please! Include return postage (international
postal reply coupons for those outside Germany) and a self-addressed
envelope if you expect a reply.  GNU Emacs for emx is not available on
diskettes from the address given above.

An emx-related mailing list has been created.  The address for people
to request to be added to or removed from the list is:

  majordomo@iaehv.nl

To subscribe, send a message containing

  subscribe emx

to majordomo@iaehv.nl.  To unsubscribe, send a message containing

  unsubscribe emx

to majordomo@iaehv.nl.

For more information, send a message containing

    help

to majordomo@iaehv.nl.

As there is currently no mailing list for the emx port of GNU Emacs,
you can use the emx mailing list.  However, you should use the general
GNU Emacs mailing lists for general GNU Emacs questions.

No warranty, see COPYING for details.


History
=======

Only changes specific to the emx port of GNU Emacs are listed here,
latest last.  See etc/NEWS for more news.

19.19
-----

- Add FAQ file

- Fix instemacs.cmd bugs

- Fix documentation errors

- Fix multi-line PM menu bar bug

- Fix bug in window resizing logic.  This solves the problem of
  windows not repainting

- Make emx-binary-mode a buffer-local variable and replace file name
  handler with C code.  This avoids conflicts with other file name
  handlers

- Add emx-meta.el

- Support visible-bell

- Support popup menus created by functions invoked through the PM menu
  bar

- set-frame-position now sets the position of the client area instead
  of the position of the frame window

- Add remove-from-window-list and pm-session-bond

- Define more colors, rename OS/2 colors to avoid conflicts with X
  colors

- Automatically redefine some colors for 16-color displays

- Ignore blanks in color names

- pm-display-planes now returns the correct value

- Support of outline fonts improved

- Clip text output to reduce problems with italic fonts

- Use the face name instead of the family name for pm-list-fonts.
  Now, you can use the font "12.Courier Bold Italic", for instance, to
  get a real bold italic font instead of a simulated one

- Examples for setting default-frame-alist fixed: the new value should
  be added to the front of the list

- Support .inf file name extension for info files, run `gzip -d'
  instead of `gunzip'

- The default value of emx-shell-regexp now includes 4OS2.

- Add optional palette manager support.  If you want to play with the
  palette manager, define the constant USE_PALETTE_MANAGER when
  compiling pmemacs.c.  However, there are several drawbacks.  For
  instance, the cursor isn't displayed properly.  Therefore, palette
  manager support is disabled by default


19.21
-----

- Fix mouse event bug: a wrong mouse position was reported in some
  cases

- Fix problem with (shortcuts . nil) in default-frame-alist being
  ignored for the inital frame

- Fix bug in handling of double clicks

- Fix bug in face management: Now each frame can have its own default
  font

- New function: emx-toggle-truncate-lines (f9 t)

- emacsserver now uses two threads instead of two processes


19.22
-----

- vc-register (C-x v i) now works again (vc-find-binary adapted)

- vc-version-other-window (C-x v ~) now works

- Add yet another key sequence for goto-line: f9 g

- Don't pass `-i' to cmd.exe in shell mode.  This solves the `error
  SYS1034' problem

- Attempt at fixing the `core dump while resizing' problem.  However,
  the echo area is now sometimes a few pixels too high

- Fix incompatibility with `FeelX 1.0'

- Use /emacs/19.22/data/DOC instead of /emacs/19.22/data/DOC-19.22.x.
  This simplifies installation on FAT and CDROM

- cp850acc.el added


19.22 (25-Jan-1994)
-------------------

- Use the -O option (optimize) for compiling Emacs (the -O option got
  lost in version 19.20)

- Change instauctex.cmd for AUC TeX 8.0

- Align file names in the Buffers menu

- Simplify dump.cmd -- emxl.exe is now in emxrt.zip

- Apply patch for fixing the slowness of describe-bindings (C-h b)

- Disable the code which incorrectly set exec-directory

- New variable: emx-system-type

- Fix bug: the documentation of the functions defined in emx-patch.el
  and emx-funcs.el wasn't available

- The default value of emx-shell-regexp now includes COMMAND.COM and
  4DOS.COM.  Only lower-case letters should be used in emx-shell-regexp
  because `downcase' is applied to the file name

- Replace - with _ on CDROM for the `load' function, see emx-cdrom-load


19.25 (08-Jun-1994)
-------------------

- Note that you should now use the variant of ispell.elc which comes
  with GNU Emacs.  If you are using Ispell, remove the Ispell-related
  statements from .emacs, default.el, and site-start.el, and set
  ispell-program-name instead

- The EMACSLOADPATH, EMACSDATA, and EMACSPATH environment variables
  are no longer required -- please delete them unless you want to
  override the or supplement the defaults directories, or put
  emacs.exe into a directory not related to the Emacs directory
  hierarchy.  The default directories are now relative to the
  directory from which emacs.exe is run

- Do not use AUC TeX 8.0 because powerkey.el won't work with GNU Emacs
  19.25.  Upgrade to AUC TeX 9.0!

- Support e-mail and news (NNTP) with IBM TCP/IP 2.0 for OS/2

- Drag & drop support has been added: you can now drop file objects on
  a PM Emacs window.  Up to 8 objects can be dropped at a time

- The emx-shell-regexp variable no longer exists.  A new variable,
  program-name-handler-alist, is now used instead.  See
  lisp/emx-patch.el and on-line help for program-name-handler-alist
  for details

- The last (third) version number is used to indicate the version
  number of the emx port: 19.25.1 is the first release of the emx port
  of GNU Emacs 19.25, 19.25.2 is the second release of the emx port of
  GNU Emacs 19.25, and so on.  The last version number is no longer
  incremented when dumping a new emacs.exe

- The `shortcuts' frame parameter can now enable accelerator keys
  individually

- Add `menu-bar-time-out' frame parameter

- Add `pm-align-menu-key-descriptions' variable for controlling the
  formatting of keyboard equivalents in submenus of the menu bar

- Add `pm-popup-menu-align-top' variable for controlling the
  positioning of popup menus.  The default is now to position the top
  item at the mouse position

- Add `pm-file-dialog' and `pm-file-menu' (renamed `pm-files-menu' in
  Emacs 19.29) for using OS/2's standard file dialog

- Fix `oscillating frame' bug

- `~' in a menu is now visible (though underlined)

- Rename `pm-defined-color' to `pm-color-defined-p'

- Support UNC, again

- Add functions for selecting the code page

- jka-compr works now (on HPFS drives only)

- Bind `iconify-frame' to C-z in PM mode

- Files to be read and written in binary mode now include also those
  whose names end in .gz, .z, and .Z

- New functions: find-file-binary, emx-remove-binary-mode

- Add `binary-process-input' and `binary-process-output' variables

- `emx-binary-mode' is no longer reset to nil when changing the major
  mode of a buffer (`kill-all-local-variables').  The default value of
  `emx-binary-mode' can no longer be set with `set-default'

- The BACKTAB key (Shift+TAB) now generates a `backtab' event instead
  of `S-backtab'

- Modifying large buffers is now much faster

- Input is no longer echoed in CMD.EXE Shell mode (`cmd' command)

- Fix problems with expand-file-name and abbreviate-file-name

- The old-style menu bar is no longer supported; the command
  `pm-menu-bar-mode' is no longer available (use `menu-bar-mode'
  instead).  The `pm-menu-bar' frame parameter is no longer available
  (use `menu-bar-lines' instead)

- emacs-priority now supports another priority class: idle-time

- The priority of child processes is controlled by the
  process-priority variable

- make-temp-name no longer truncates the prefix on HPFS drives

- Add functions for retrieving, attaching, and removing extended
  attributes


19.27 (16-Sep-1994)
-------------------

- instauctex.cmd assumes that you are installing AUC TeX 9.2a or later

- Use nicer separator lines in menus

- You can now choose a font for menus with the `menu-font' frame
  parameter

- New package for drawing pictures using line characters: linedraw.el

- Make reading from the minibuffer in activate-menubar-hook work (this
  solves an AUC TeX problem)

- Retry deleting the temporary file created by call-process-region
  after a process ends (this solves the problem of sendmail temporary
  files not being deleted)

- find-file-binary fixed,  it did not load the file in binary mode

- Pasting while the clipboard is empty no longer crashes Emacs


19.28 (09-Apr-1995)
-------------------

- Various bugs have been fixed

- Emacs now autosaves buffers when pmemacs crashes

- The tcp program works around a bug in IBM's TCP/IP

- emacs.exe expands wildcards on its command line

- When running Emacs in text mode, set-screen-height and
  set-screen-width now try to resize the VIO window or the full-screen
  video mode to the new size.  Selecting an unsupported size is
  silently ignored; in consequence, the display may be wrong in such a
  case

- Support RGBi:r/g/b color specifications (r, g, and b are floating
  point numbers in 0.0 through 1.0)

- The space key with modifiers now generates character code SPC (32)
  instead of symbol `space'.  For instance, change [M-space] to [?\M-\ ]


19.29.1 (26-Jun-1995)
---------------------

- Please use the -pm option instead of -d for running Emacs in
  Presentation Manager mode.  Though -d might seem to work, it is no
  longer supported

- New programs for e-mail support; network support files are now
  packaged in e29net.zip

- The menu bar has been reimplemented.  The frame parameter
  `menu-bar-time-out' and the `safe-menu-bar-menu' property no longer
  exist

- `pm-file-menu' renamed `pm-files-menu'

- Printing now works; note that `print-buffer' -- which is invoked by
  Tools->Print_Buffer -- requires a `pr' program.  If you don't have
  such a program (it comes with the GNU text utilities) or don't want
  page headers, use `lpr-buffer' instead of `print-buffer'

- New `force-fat-regexp' variable for making auto-saving and backup
  files work on Novell Netware volumes without long file name support.
  You should set `force-fat-regexp' to a regexp which matches path
  names on such volumes

- The default for the `shortcuts' frame parameter is now `nil', that
  is, all shortcut keys are disabled, being available for binding to
  Emacs commands.  (The site-start.el file, however, enables the
  Alt+F4 shortcut key for closing the frame.)  If you want to use
  Alt+F7 for moving a frame, F10 for selecting the menubar, etc., you
  have to set the `shortcuts' frame parameter

- The `8.Helv' font is now used for menus by default

- Binary mode is enabled for file names ending in .arc, .lzh, .zip,
  and .zoo, for arc-mode.el

- New commands in linedraw.el for drawing frames: linedraw-frame-inside and
  linedraw-frame-outside

- A program name handler has been added to make `call-process' invoke
  cmd.exe (pointed to by the COMSPEC environment variable) for running
  .cmd files

- The (faked) user ID has been changed from 0 to 1

- The `framep' function now returns `pm' instead of `x' for PM frames


19.29.2 (29-Jun-1995)
---------------------

- A bug has been fixed which sometimes made Emacs freeze

- The `case-fold-file-names' variable has been added


19.30.1 (17-Dec-1995)
---------------------

- New file: e30el3.zip (to make e30el1.zip and e30el2.zip fit onto
  diskettes)

- Vertical scroll bars added (contributed by Patrick Nadeau)

- Emacs now uses ptys to communicate with child processes if Holger
  Veit's xf86sup.sys driver is installed

- Preliminary support for ange-ftp (requires xf86sup.sys)

- Experimental attempt at supporting mixed-case file names.  See
  variable `preserve-file-name-case'

- Emacs attempts to avoid fragmentation of the files it writes

- Extended attributes are now preserved in files copied and edited

- In PM mode, keypad keys now generate kp- events: kp-0 through kp-9,
  kp-add, kp-subtract, kp-multiply, kp-divide, kp-enter, and
  kp-decimal or kp-separator (depending on the keyboard layout).
  `enter' has been renamed kp-enter, `center' has been renamed
  kp-center

- The backspace key now generates a `backspace' event

- The font names of the font menu now use Host Portable Character
  Representation (thanks, David Charlap)

- The TAB key now works even if code page 1004 is active

- os2help.el has been improved by <Stefan_Gruendel@wue.maus.de>:
  the EXTENSIONS statement of index files is used;
  you can select the book to view if there are multiple matching entries

- The `--unix' option is now passed to the `ls' program.  This makes
  dired much faster.  Of course, a version of ls.exe which supports
  the `--unix' option is now required.  Please use Kai Uwe Rommel's
  port of `ls' in gnufutil.zip

- dired no longer supports the default OS/2-style output format of Kai
  Uwe Rommel's port of `GNU ls' (without the `--unix' option).  Note
  that a program name handler (pnh-ls) has been installed to pass the
  `--unix' option to `ls'.  The `emx-dired-kur-ls-setup' function has
  been removed

- Editing .tar.gz and .tgz files should work now (there was a problem
  with text vs. binary mode)

- New variable: `emx-start-session' to control whether to start child
  processes in separate sessions (default) or not

- The -iconic command line option works now

- The heap size has been increased to 48 Megabytes

---------------------------------- END ---------------------------------------
