Smarty-Mode
Manual

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

2. Installation


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

2.1 Requirements

Smarty 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 Smarty Mode :


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

2.3 Installation


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

2.3.1 Installation

To install Smarty 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 smarty-0.0.5.tar.gz

Now you have a `smarty' directory in the installation directory. This directory contains 2 files `smarty-mode.el' and `smarty-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 'smarty-mode "smarty-mode" "Smarty 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 smarty
tar zxvf smarty-0.0.5.tar.gz

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

2.4 Invoke Smarty-Mode

You have two possibilities to invoke the Smarty Mode.

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

    M-x smarty-mode

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

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