Installing the Emacs Ado-mode

The installation instructions are a bit involved, because I'm not counting on anyone to have a common place for installation of emacs or customizations.

  1. Download the ado-mode folder from the public ftp site. It is not compressed into a dmg, gzip, sit, or zip archive to make the installation instructions easier.
  2. Decide whether this is for a bunch of people or not.
  3. Put the ado-mode folder in a place where Emacs will find it. Where you put it depends on whether this is for many folks or for one lone person.
  4. Copy (do not move!) the ado-signature-template, to a convenient personal location, and change it to match your name and address. Make a mental not of where you stored it. You will need this location in the next step.
  5. Now you need to play with emacs' initialization, to be sure that it knows that you want to use the ado-mode to use the context-sensitive highlighting whenever possible, and to be sure that it can find templates used for new ado files and the like. This is done by either adding some code to either the .emacs file in your home directory for private initialization, or to the site-start.el file for group initialization.

    There are two files in the ado-mode folder called site_scrap.el and personal_scrap.el. The first contains code which should be edited and added to the site initialization file. The second contains code which should be edited and added to your .emacs file. If there will be only one user, all the information should go in the .emacs file.

    If you're not really sure what to do, try opening your .emacs (MS Windows: _emacs) file (C-x C-f .emacs), and then paste all the code from the two scrap files into it. Change my name to your name. Change the paths which start with either /Universal/Custom or ~/Custom to the true paths to the files and directories (folders).

    You could also use M-x customize-group ado from within emacs to tell emacs where to find files and the like. The code scraps from above make it easier to distinguish between site-wide and individual pieces, though.

  6. You might also want to change the default colors for the font highlighting. Here is a screen-shot of the highlighting I use, and which I find quite readable:

    highlighing example

    The font-locking can be changed either by customizing the ado-mode faces directly using M-x customize-group ado-font-lock, or by changing the font-lock faces which are inherited by the ado-mode via M-x customize-group font-lock-highlighting-faces. I prefer the latter. In any case, here are the actual colors from the above screen-shot:

    Note that specifiying the font is system specific. I use the apple-monaco font, 'cuz I like it. Others like other fonts. You should set the font from within emacs by using M-x customize, and then clicking the Faces, Basic Faces, and then click the show button next to Default face. This will avoid all the platform specific methods for referring to fonts. (Note: I've heard that outline-courier new works in MS Windows 2000.)

  7. If you run into trouble, because you keep getting Symbol's function definition is void: line-number-at-pos errors, put the following into your .emacs file: (require 'ado-hacks). This should cause the proper function get loaded without having it interfere with future updates. (This problem seems to happen for emacs 21.something and earlier.)
  8. One last note: One user ran into trouble with recursion-list-depth error messages from make-regexp (I've not ever had this problem before). If you run into this problem,

If you have any trouble with the installation instructions, drop me a line so that I can fix them.

If you'd like to be notified when the package gets updated, click here to send an email to me. Please don't change the subject. Privacy? You bet. When the advertising trolls come around, I'll give them everybody's name except yours. Seriously: I won't use it for anything but notifications of new ado modes.


Send Bill comments about this page or go to his main home page

Last Updated Friday, March 24, 2006, 15:01