Manual
2. Installation
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.
2.2 Download
Two internet address to download PHP Mode :
2.3 Installation
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-mode-0.0.3.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)
|
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-mode-0.0.3.tar.gz
|
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))
|
|