===============================================================================
GNU Emacs 19 for emx (OS/2 2.0 and 2.1)                             26-Jul-1993
===============================================================================

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

This is GNU Emacs 19.17 for emx on OS/2 2.0 or 2.1.  The port was done
by Eberhard Mattes based on ideas of the port of GNU Emacs for OS/2
done by Joerg Viola.  There is a slight chance that this port of GNU
Emacs also works with emx on MS-DOS, but that hasn't been tested.


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

The "GNU Emacs 19.17 for emx" distribution consists of the following
files:

  README                this file (/emacs/19.17/emx/README)
  e17el1.zip            Emacs Lisp files (source), part 1
  e17el2.zip            Emacs Lisp files (source), part 2
  e17info.zip           info files (on-line help)
  e17lib1.zip           Emacs Lisp library (base set, compiled)
  e17lib2.zip           Emacs Lisp library (remaining files, compiled)
  e17man.zip            documentation files (mostly for TeX)
  e17min.zip            minimal set of files for running GNU Emacs
  e17more.zip           additional files
  e17rest.zip           remaining files
  e17src.zip            sources


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

GNU Emacs 19.17 for emx requires emx 0.8g -- if you have an older
version of emx.dll, emxbind.exe and termcap.dat, get emxrt.zip from

  ftp.uni-stuttgart.de [129.69.1.12]: /soft/os2/emx-0.8g
  ftp-os2.nmsu.edu  [128.123.35.151]: /os2/2_x/unix/gnu/emx08g
  src.doc.ic.ac.uk     [146.169.2.1]: /pub/packages/os2/2_x/unix/gnu/emx08g
  ftp.informatik.tu-muenchen.de [131.159.0.198]:
                                      /pub/comp/os/os2/devtools/emx+gcc

You might want to also get the following files:

  ftp-os2.nmsu.edu:              os2/all/graphics/smallfnt.zip
  ftp-os2.nmsu.edu:              os2/all/unix/shells/ms_sh21c.zip
  ftp-os2.nmsu.edu:              os2/2_x/unix/unixutils/isp3009b.zip
  ftp.informatik.tu-muenchen.de: pub/comp/os/os2/gnu/systools/gnufutil.zip
  prep.ai.mit.edu:               pub/gnu/elisp-2.01.1.tar.gz

smallfnt.zip contains a small fixed-width bitmapped font for the
Presentation Manager.

ms_sh21c.zip contains the Data Logic shell, a Unix-like shell.

isp3009b.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.

elisp-2.01.1.tar.gz contains the Emacs Lisp documentation.


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

Install the emx runtime package emxrt.zip (version 0.8g 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.17 for emx on OS/2 2.0 and 2.1.

GNU Emacs is installed in the \emacs directory of a 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.)  However, you can edit files on FAT partitions.

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
                     the Data Logic shell), you should use the path
                     name of that shell.  Otherwise, use the path name
                     of cmd.exe

      EMACSLOADPATH  path to Lisp library, defaults to /emacs/19.17/lisp

      EMACSPATH      path to programs, defaults to /emacs/19.17/bin

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

      HOME           your home path, replaces ~ in path names.  Emacs
                     tries to load .emacs, for instance, from that
                     directory

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

    Example (Emacs will be installed on drive C):

      SET PATH=C:\OS2;[...];C:\EMACS\19.17\BIN
      SET SHELL=c:/bin/sh.exe
      SET EMACSLOADPATH=c:/emacs/19.17/lisp
      SET EMACSPATH=c:/emacs/19.17/bin
      SET SYSTEMNAME=vergil
      SET HOME=c:/home
      SET TMP=c:/tmp

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 and unpack the file e17min.zip by typing

      cd \
      unzip a:e17min

    on an HPFS drive.  Note that you cannot use PKUNZIP to unpack
    the ZIP files.

5.  Create a preloaded version of GNU Emacs by typing

      cd \emacs\19.17\bin
      dump

    In case you're short of disk space, you can delete the file
    \emacs\19.17\bin\temacs now.  If you want to dump Emacs again,
    restore that file from e17min.zip.

6.  Now you can run GNU Emacs by typing

      emacs                   (run Emacs in text mode)
      emacs -d                (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:e17lib1
      unzip a:e17more
      unzip a:e17info

8.  To unpack all the .el files, type

      cd \
      unzip a:e17el1
      unzip a:e17el2

    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.

    Additional files are packaged in the remaining ZIP files:

      cd \
      unzip a:e17lib2
      unzip a:e17rest
      unzip a:e17man

    These files are usually not required for running GNU Emacs under
    emx.

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

      c:\emacs\19.17\bin\emacs.exe
      c:\emacs\19.17\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, 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.


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

You should customize \emacs\19.17\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 default-frame-alist
              '((altgr-modifier . meta))))
(standard-display-8bit 128 254)                       ; [3]
(aset standard-display-table 256 16)                  ; [4]
(aset standard-display-table 257 31)
(aset standard-display-table 259 24)
(add-hook 'server-request-hook                        ; [5]
          '(lambda ()
             (make-frame-visible)
             (focus-frame (selected-frame))))
(add-hook 'dired-load-hook 'emx-dired-kur-ls-setup)   ; [6]

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

(if window-system                                     
    (progn
      (pm-edit-menu)                                  ; [8]
      (set-face-background 'modeline "red")           ; [9]
      (set-face-foreground 'modeline "yellow")))
---------------------------------------------------------------------

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.  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 (256),
      continued lines (257) and for displaying control characters
      notation (259)

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

[6]   Use Kai Uwe Rommel's OS/2 port of GNU ls (GNU file utilities)
      for dired.  If you're using a version of ls where the output of
      `ls -l' is Unix-compatible, you should not use that line

[7]   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

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

[9]   Make the mode line yellow on red


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

All file names are translated to lower case.  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.  To keep the letter case in file names on HPFS, see
`Choosing the backup type'.

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

Emacs doesn't know that trailing dots in file names are ignored by
OS/2.  It believes that "foo" and "foo." are different files.


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

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

  SIZE[.bold][.italic]NAME

Note that not all fonts are available in all appearances.  "System
Monospaced", for instance, is available only in bold.

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

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

Examples of fixed-spaced bitmap fonts:

  8.Courier
  10.Courier
  10.System Monospaced
  12.bold.Courier
  8.System VIO                    (OS/2 2.1)
  6.Small                         (smallfnt, 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 some pixels will stay on the
screen until the frame is redisplayed (C-l).  Fonts which are smaller
than the default font, however, can be used.  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.

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-os2.nmsu.edu: os2/all/graphics/smallfnt.zip

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 default-frame-alist '((font . "8.Courier"))))

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 bold and italic
variants of that font.  Example:

  (setq default-frame-alist
        (append default-frame-alist
           '((font . "-os2-Courier-medium-r-normal--*-100-*-*-m-*-cp850"))))

You can use a popup menu to select the default font: Click mouse
button 3 (that's the middle mouse button, by default) while depressing
the CONTROL key (C-down-mouse-3).

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!


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

In text mode, the ALT keys generate the A- modifier (alt).  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 default-frame-alist '((alt-modifier . alt))))

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 default-frame-alist '((altgr-modifier . alt))))

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're 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 default-frame-alist
                '((width . 80) (height . 40))))

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 three advantages under OS/2:

-  the letter case of the name of the file is retained (normally, GNU
   Emacs for OS/2 2.0 uses lower-case file names)

-  the extended attributes of the file are retained

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

There are two known disadvantages under OS/2:

-  the extended attributes of the backup file are lost

-  the letter case of the file name is lost for the backup file

You can choose: Either keep the extended attributes and 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 variable emx-binary-mode controls whether to use text mode or
binary mode.  If the variable is nil (that's the default setting),
text mode is used.  If the variable is t, binary mode is used.  A file
name hook is employed to temporarily set the emx-binary-mode variable
depending on the file name while reading or writing a 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$")

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

  \.elc$
  \.tar$

Currently, there is no buffer-local variable for controlling text mode
vs. binary mode.  Do not set the emx-binary-mode variable manually --
always use emx-add-binary-mode.


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

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


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 the
Data Logic shell, which is available for anonymous ftp:

  ftp-os2.nmsu.edu: os2/all/unix/shells/ms_sh21c.zip

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.  To use drag & drop, create a
program object for emacsclient.exe and insert

  -w %*

in the `Parameters' field of the `Program' page of the settings
notebook.


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

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

  ftp-os2.nmsu.edu: os2/2_x/unix/unixutils/isp3009b.zip

You should use the ispell.el file that comes with Ispell instead of
the ispell.el file that comes with GNU Emacs.  To use Ispell, add the
following statements to your .emacs or site-start.el file, using
correct path names:

---------------------------------------------------------------------
(setq ispell:program-name "c:/ispell/ispell.exe")
(fmakunbound 'ispell-buffer)
(fmakunbound 'ispell)
(autoload 'ispell-word "c:/ispell/ispell"
  "Check the spelling of word in buffer." t)
(global-set-key "\e$" 'ispell-word)
(autoload 'ispell-region "c:/ispell/ispell"
  "Check the spelling of region." t)
(autoload 'ispell-buffer "c:/ispell/ispell"
  "Check the spelling of buffer." t)
(autoload 'ispell-complete-word "c:/ispell/ispell"
  "Look up current word in dictionary and try to complete it." t)
(autoload 'ispell-change-dictionary "c:/ispell/ispell"
  "Change ispell dictionary." t)
(defalias 'ispell 'ispell-buffer)
---------------------------------------------------------------------

Moreover, you should replace the current definition of
highlight-spelling-error-v19 in ispell.el with

---------------------------------------------------------------------
(defun highlight-spelling-error-v19 (start end &optional highlight)
  (if highlight
      (progn
        (setq ispell-overlay (make-overlay start end))
        (overlay-put ispell-overlay 'face 'highlight))
    (delete-overlay ispell-overlay)))
---------------------------------------------------------------------

Probably later versions of ispell.el have an appropriate definition of
highlight-spelling-error-v19.


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 "unkown".


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

-   For best results, run emacs.exe from the drive where it is
    installed -- you can change the drive in GNU Emacs.

-   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 colors defined in term/pm-win.el are designed for 256-color
    graphics modes.  You might have to modify the value of
    pm-color-alist for 16-color graphics modes.  For instance,
    "darkseagreen2" is gray in 16-color graphics modes.  Probably you
    should use

      [0 255 255]

    (cyan) for "darkseagreen2".


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

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

  emacs-priority
  emx-add-binary-mode
  filesystem-type
  keyboard-type
  file-name-valid-p
  pm-menu-bar-mode

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

  emx-binary-mode
  emx-shell-regexp
  min-skip-run
  pm-color-alist

Additional command line options for PM:

  -d                    Use windowing system (note: no argument!)
  -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 -d -fg white -bg darkblue -fn 8.Courier myfile.c

Fonts:

  A font is specified by size (printer's points) and name:

   SIZE.NAME

Colors:

  black         white           blue          red
  pink          green           cyan          yellow
  darkgray      darkblue        darkred       darkpink
  darkgreen     darkcyan        brown         palegray
  ...and others, see pm-color-alist in term/pm-win.el

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

  name                        String    Window title
  font                        String    Font
  background-color            String    Default background color
  foreground-color            String    Default foreground color
  alt-modifier                Symbol    Modifier generated by left Alt key
  altgr-modifier              Symbol    Modifier generated by AltGr key
  cursor-type                 Symbol    Cursor type
  cursor-blink                Boolean   Blinking cursor
  pm-menu-bar                 Boolean   Display Presentation Manager menu bar
  shortcuts                   Boolean   Enable F1, F10, A-f4, A-space etc.
  mouse-buttons               String    Swap mouse buttons
  height                      Integer   Height of window, in lines
  width                       Integer   Widtht of window, in columns
  left                        Integer   horizontal position, in pixels
  top                         Integer   vertical position, in pixels

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
  box            A filled box (default)
  frame          The outline of a box
  underline      A horizontal line below the characters
  halftone       A filled box (gray)

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 generates
  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 default-frame-alist
                '((background-color . "darkblue")
                  (foreground-color . "white")
                  (alt-modifier . alt)
                  (altgr-modifier . hyper)
                  (font . "8.Courier")
                  (mouse-buttons . "123"))))


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.

- Extended attributes are not preserved in files edited or copied.

- The timestamps of all events but mouse button events are always 0.

- Scrollbars are not implemented.

- Several functions specific to X Windows are missing.

- When clicking on the title bar while a popup menu is active which
  has not been opened by a down-mouse-# event, Emacs hangs.

- You have to release the mouse button before clicking on a popup menu
  activated by clicking on the the (non-PM) menu bar.

- 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...

- Drag & drop is not implemented.  Instead of dropping a file on (a
  running instance of) GNU Emacs, you should drop the file on an
  emacsclient icon.  See above for proper installation of emacsclient.

- Emacs doesn't know that trailing dots in file names are ignored by
  OS/2.  It believes that "foo" and "foo." are different files.

- The `Choose Pasting Selection' item of the Edit menu doesn't work.

- The current implementation of binary mode (using a file name
  handler) collides with ange-ftp.

- The client windows aren't repainted while a popup menu is active.


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

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

  - dmake 3.8

  - emx 0.8g (or later), GCC 2.4 (or later), etc. for emx

  - GNU Bison 1.19 (or later)

  - GNU sed 1.16 (or later)

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

You can find all these programs on ftp.informatik.tu-muenchen.de,
somewhere under pub/comp/os/os2.

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

  cd \
  unzip a:e17src

To compile GNU Emacs, type

  cd \emacs\19.17
  configure
  cd lib-src
  make
  cd ..\src
  mmake
  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.

Note: src/Makefile is currently not used.

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

  move ..\etc\doc-19.17.* \emacs\19.17\data

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


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

  emx/README
  emx/emx1.sed
  emx/emx3.sed
  emx/emx4.sed
  src/dist.cmd
  src/dump.cmd
  src/install.cmd

To debug GNU Emacs, type

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

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.17\src
  install
  dist
  cd ..\emx
  make-dist


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

  Eberhard Mattes
  Teckstrasse 81                                      (TeX: Teckstra{\ss}e)
  D-71696 Moeglingen                                  (TeX: M\"oglingen)
  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: emx-list.  The address
for people to request to be added to or removed from the list is:

  listserv@ludd.luth.se

To subscribe, send a message containing

  sub emx-list Joe User

to listserv@ludd.luth.se.  Of course, you should use your name instead
of Joe User's name.

As there is currently no GNU Emacs for OS/2 related mailing list, you
should use the emx mailing list.

No warranty, see COPYING for details.

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