                       Installation of ASN.1 mode
                          for Emacs and XEmacs
                     *******************************

Content:

 - Compilation (optional)
 - Installation without compilation
 - Modification of .emacs :
 - Documentation
 - Installation by super-user
 - Version of (X)Emacs


Compilation
***********

  See installation "without compilation" if you can't/don't want to compile.

  1) To compile the source Emacs files "*.el", to generate "*.elc",
      if you are an Emacs user, type:

     $ make

     If you are an XEmacs user, type:

     $ make EMACS=xemacs

     NB:
      It is not absolutely necessary to compile these files,
      compilation will improve performance. If you want to use these
      files in both Emacs and for XEmacs, don't compile it !, or
      install resulting "*.elc" files in different directories (one
      accessed by Emacs, the other one by XEmacs.

     NB:
      If your make command is not able to parse the default Makefile,
      try the GNU make. You can get it from
      ftp://prep.ai.mit.edu/pub/gnu/.

If you want to specify the emacs to use for compiling,
type "EMACS=command make"
If you are using XEmacs, you must type something like that :
EMACS=xemacs make

  2) Then:

     $ DEST=$HOME/emacs make install

     or

     $ make install DEST=$HOME/emacs

     $HOME/emacs (AKA ~/emacs) is an example of installation
     directory. You can specify another one. But $HOME/emacs will be
     assumed to be the installation directory in further sections of
     this document.

     NB:
      In case the 'install' command is not compatible with the current
      makefile, you may specify another command using the follwing
      command:

 $ make install DEST=$HOME/emacs INSTALL=myinstall


Installation without compilation
********************************

If you can't compile or/and use the Makefile to install :
Copy the *.el, doc/*.info files in the directory "site-lisp".
On many system, it can be found in /usr/share/emacs/.

NB : It's better to put *.info files in /usr/share/info and to use
     "install-info".


Modification of ~/.emacs :
**************************

  For use the ASN.1 mode, add following lines into your ~/.emacs file:

;;;
(setq (load-path (cons (expand-file-name "~/emacs") load-path)))

;;; ASN.1 Mode
(autoload 'asn1-diff-mode "asn1-diff"
  "Major mode for editing comparison of ASN.1 specifications." t)
(autoload 'asn1-diff "asn1-diff"
  "For comparing ASN.1 specifications." t)
(autoload 'asn1-mode "asn1-mode"
  "Major mode for editing ASN.1 specifications." t)
(setq auto-mode-alist
      (cons '("\\.[Aa][Ss][Nn]\\([1]\\|[pP][pP]?\\)?$" . asn1-mode)
	    auto-mode-alist))
(setq auto-mode-alist
      (cons '("\\.[Aa][Ss][Nn][dD]$" . asn1-diff-mode2) auto-mode-alist))

;;;
  Replace the "~/emacs" in the first line by the install directory.

  NB:
   If the file ~/.emacs doesn't exist, create it !  (This file is
   loaded at Emacs startup)


Documentation
*************

  To build the documentation, type:

  $ make html

  NB:
   The 'texi2html' command is required to build the HTML
   documentation.

  or

  $ make ps

  NB:
   The 'texi2dvi' and 'dvips' commands are required to build the
   PostScript documentation.

  or

  $ make info

  NB:
   The 'makeinfo' command is required to build the info (Emacs inline
   documentation system) documentation.

  Then, copy the files where you want :

  $ cp *.ps ~/doc
  $ cp *.html ~/doc

  As many people don't know how to install the info files as user, the info
  documentation is automatically copied with the .el files. If you
  know how to install info files, you can do it properly.

Installation by super-user
**************************

  Install the package in the directory site-lisp/ of Emacs.

  $ DEST=/usr/local/emacs/site-lisp make install

  Add the following lines to the file site-start.el of the directory
  site-lisp/ (if this file does not exist, create it).

;;; ASN.1 Mode
(autoload 'asn1-diff-mode "asn1-diff"
  "Major mode for editing comparison of ASN.1 specifications." t)
(autoload 'asn1-diff "asn1-diff"
  "For comparing ASN.1 specifications." t)
(autoload 'asn1-mode "asn1-mode"
  "Major mode for editing ASN.1 specifications." t)
(setq auto-mode-alist
      (cons '("\\.[Aa][Ss][Nn]\\([1]\\|[pP][pP]?\\)?$" . asn1-mode)
	    auto-mode-alist))
(setq auto-mode-alist
      (cons '("\\.[Aa][Ss][Nn][dD]$" . asn1-diff-mode2) auto-mode-alist))



Version of (X)Emacs
*******************

  This packages will work with any version of Emacs or XEmacs greater
  than 20.

  For the versions beetween 19.34 and 20, you have to install the
  custom package (http://www.dina.kvl.dk/~abraham/custom/). In this
  case, don't compile the .el files.

  Emacs is avaible at :

  Unix :
  ---------------
    ftp://ftp.lip6.fr/pub/gnu/emacs/
    ftp://ftp.irisa.fr/pub/gnu/emacs/

  Windows 95/98 or NT :
  ---------------------------
    ftp://ftp.lip6.fr/pub/emacs/ntemacs/
    http://www.gnu.org/software/emacs/windows/ntemacs.html

  XEmacs is avaible at :

  Unix :
  ---------------
    ftp://ftp.lip6.fr/pub/emacs/xemacs/
    ftp://ftp.sunet.se/pub/gnu/xemacs/
    ftp://sunsite.auc.dk/pub/emacs/xemacs/

  Windows 95/98 or NT : (beta version)
  ---------------------------
    ftp://ftp.xemacs.org/xemacs/binary-kits/win32/
    Also see important information from:
    http://jagor.srce.hr/~hniksic/xemacs-on-windows-faq.txt
