Configuring html-helper-mode

html-helper-mode has several helpful features that are turned off by default, as well as several variables that the user might want to change for his or her own use.

You can configure these variables by adding the appropriate setq forms in your .emacs. You should read your emacs manual to learn how to do this - in general, you want to use

(setq <variable name> <value>)
where <value> is one of t or nil if it is an on/off value, or a number or a quoted string. See the recommended configuration for examples.


Features

The skeleton and timestamp features are turned off by default because they modify the buffer. I recommend you turn them on, though, as they are very useful.

html-helper-do-write-file-hooks (default nil)
If t, html-helper-mode will try to update a timestamp in the document, and warn the user if it can't.
html-helper-build-new-buffer (default nil)
If t, html-helper-mode will insert a skeleton for new documents.
You might also like to have prompting for your forms.

tempo-interactive (default nil)
If t, the user will be prompted in the minibuffer for the values of the fields of cookies

Indentation variables

There are three variables that control indentation:

html-helper-basic-offset (default 2)
basic indentation for list item
html-helper-item-continue-indent (default 5)
text that is part of an item but not in the line with the item token are indented this amount. 5 is the length of "<li> "
html-helper-never-indent (default nil)
if t, all the fancy indentation code is turned off

Hooks

Hooks allow your functions to be called at various times within the inner workings of html-helper-mode. Use add-hook instead of setq to modify these variables.

html-helper-mode-hook (default nil)
hook run when html-helper-mode is started
html-helper-load-hook (default nil)
hook run when html-helper-mode is loaded
html-helper-timestamp-hook (default html-helper-default-insert-timestamp)
If html-helper-do-write-file-hooks is t, then this hook is called to insert the new timestamp. The default inserts a simple timestamp.
tempo-insert-string-hook (default nil)
If set, this function will be applied to every string before it is inserted. For example, setting it to 'upcase will cause all strings to be inserted uppercase.

Strings

There are various strings and templates that html-helper-mode inserts at appropriate times. Most have useful defaults, but you should set html-helper-address-string yourself.

html-helper-address-string (default "")
Default author string for each file
html-helper-new-buffer-template (default is hairy)
list of strings and tempo tokens that is inserted when a new buffer is created and html-helper-new-buffer-strings is t
html-helper-timestamp-start (default <!-- hhmts start -->)
comment used to delimit the beginning of a timestamp. Anything between this and html-helper-timestamp-end is deleted every time the file is written if html-helper-do-write-file-hooks is t
html-helper-timestamp-end (default <!-- hhmts end -->)
end of the timestamp

Recommended configuration

I suggest you turn on both html-helper-do-write-file-hooks and html-helper-build-new-buffer, and set html-helper-address-string to the appropriate value for you. I use this configuration:

(setq html-helper-do-write-file-hooks t)
(setq html-helper-build-new-buffer t)
(setq html-helper-address-string 
  "<a href=\"http://www.santafe.edu/~nelson/\">Nelson Minar &lt;nelson@santafe.edu&gt;</a>")

Last modified: Wed Feb 1 14:16:18 1995
Nelson Minar <nelson@santafe.edu>