PHP-Mode
Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2. Installation


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1 Requirements

PHP Mode is a XEmacs major mode that needs the following software/packages:

  • XEmacs.
  • `font-lock' mode generaly installed with XEmacs.
  • `assoc' mode generaly installed with XEmacs.
  • `easymenu' mode generaly installed with XEmacs.
  • `hippie-exp' mode generaly installed with XEmacs.

Before continuing, you must be sure to have all this packages installed.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.2 Download

Two internet address to download PHP Mode :

  • Principal: PHP-Mode 0.0.4 (http://deboutv.free.fr/lisp/php/)
  • Secondary: PHP-Mode 0.0.4 (http://www.morinie.fr/lisp/php/)
  • Old releases: PHP-Mode (http://deboutv.free.fr/lisp/php/)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3 Installation


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.1 Installation

To install PHP Mode you need to choose an installation directory (for example `/usr/local/share/lisp' or `c:\lisp'). The administrator must have the write rights on this directory.

With your favorite unzip software, unzip the archive in the installation directory.

Example:

 
cd /usr/local/share/lisp
tar zxvf php-0.0.4.tar.gz

Now you have a `php' directory in the installation directory. This directory contains 2 files `php-mode.el' and `php-mode.elc' and another directory `docs' containing the documentation.

You need to configure XEmacs. open you initialization file `init.el' (open the file or start XEmacs then choose the Options menu and Edit Init File). Add the following lines (the installation directory in this example is `/usr/local/share/lisp') :

 
(setq load-path
      (append (list "/usr/local/share/lisp/") load-path))
(autoload 'php-mode "php-mode" "PHP mode" t)

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.3.2 Update

The update is easy. You need to unzip the archive in the installation directory to remove the old release.

Example:

 
cd /usr/local/share/lisp
rm -rf php
tar zxvf php-0.0.4.tar.gz

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.4 Invoke PHP-Mode

You have two possibilities to invoke the PHP Mode.

  • - Manually: At each file opening you need to launch PHP Mode with the following command:

    M-x php-mode

  • - Automatically: Add the following linesin your initialization file `init.el' :
     
    (setq auto-mode-alist
          (append
           '(("\\.php$" . php-mode)
             ("\\.php5$" . php-mode))
    	 auto-mode-alist))
    

[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]