Pound is distributed with pound-mode.el, an Elisp
source which provides a major mode for editing pound
configuration files in GNU Emacs. The file is located in src
directory of the distribution. To install it, follow the instructions
below.
First, select the directory where to place the file. The directory
must form a part of the emacs load-path
(see Library Search in GNU Emacs Lisp Reference Manual)
variable. Then, copy pound-mode.el to that directory. Then,
add the following statements to your .emacs or site-wide
site-start.el file (see The Emacs Initialization
File in GNU Emacs Manual):
(autoload 'pound-mode "pound-mode")
(add-to-list 'auto-mode-alist
(cons (purecopy "pound\\.cfg\\'") 'pound-mode))
The first statement loads pound Emacs major mode. The
second one associates file pound.cfg with that mode, so that
each time you load a file with that name to your editor, it will
automatically select pound-mode as its default major mode.
Depending on your customs, you may further modify
auto-mode-alist to associate pound-mode with more
files. For example, if your main configuration file includes
files from /etc/pound directory (see File inclusion), it
might be a good idea to add the following:
(add-to-list 'auto-mode-alist (cons (purecopy "pound/.*\\.cfg\\'") 'pound-mode))
Once these changes done, you can start emacs to see if it
correctly selects the major mode for your pound.cfg.
The pound-mode major mode highlights pound
configuration keywords and data types, and provides automatic
indentation for the configuration file. It defines the following key
bindings:
Place cursor at the start of the enclosing section.
Place cursor at the end of the enclosing section.
Indent region.
Check the syntax of the current buffer by running pound -c
(see lint).
The following customization variables are available:
Default indentation increment. Each nesting level in the configuration file will be indented that amount of columns, relative to the enclosing section.
The default value is 8.
Command line for starting the pound daemon. Default is
‘pound’.
Use this variable to specify full pathname of the pound
binary, if it cannot be found using the PATH shell variable, or
to supply additional options to it.
Defines pound include directory (see include directory).