Installing the Emacs Ado-mode

Basic Installation Instructions

The easiest way to install ado-mode is to use the package package built into Emacs, as it can do all the work for you, namely downloading, compiling and managing. This works, because ado-mode package is served by the MELPA package manager site.

If you would rather grab the files from Github or downloaded the zip files, go to the installing ado-mode the hard way page.

Here is the easy way to go.

  1. If you haven't set up MELPA inside of Emacs
    1. Follow the instructions for getting started with MELPA.
    2. Quit and restart Emacs.
  2. Be sure that your package list it up-to-date via M-x package-refresh-contents.
  3. Install the package inside Emacs via M-x package-install<RET>ado-mode.
  4. Quit and restart Emacs.
  5. Try to start ado-mode via M-x ado-mode<RET>

This is enough to get the syntax highlighting to work.

Additional Software

To send code to Stata, you might need to install some extra software:

Setting Up Additional Details

Ado-mode is very customizable, and works fine staight out of the box.

Customizations can be handled by Emacs built-in customization. Just type M-x customize-group RET ado, and play around with the items in Ado Main.

Changing appearance

You will likely want to change the default colors for the font highlighting. Here is an old screenshot of the highlighting I use. I find it quite readable, so it hasn't changed in forever.

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-faces. I prefer the latter, because changes will then stick for all other programming languages (but it requires knowing which ado-mode names come from which Emacs names). In any case, here are the actual colors from the above screen-shot:

To see what colors are available in Emacs, try M-x list-colors-display.

Note that specifiying the font is system specific. I use the apple-dejavu sans mono font, because 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.


If you run into trouble, please post at

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

If you would like keep up with updates, follow the @adomode Twitter account:

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

Last modified: Sun Oct 23 17:27:34 EDT 2022