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.
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.
If t
, html-helper-mode
will try to update a timestamp in the document, and warn the user if it can't.
If t
, html-helper-mode
will insert a skeleton for new documents.
You might also like to have prompting for your forms.
If t
, the user will be prompted in
the minibuffer for the values of the fields of cookies
By default, the menu is limited so that it starts up quickly.
If t
, html-helper-mode always presents
you with a full menu of everything it can do.
There are three variables that control indentation:
basic indentation for list item
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>
"
if t
, all the fancy indentation
code is turned off
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.
hook run when html-helper-mode is started
hook run when html-helper-mode is loaded
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.
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.
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.
Default author string for each file
list of strings
and tempo tokens that is inserted when a new buffer is created and html-helper-new-buffer-strings
is t
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
end of the timestamp
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://nelson.www.media.mit.edu/people/nelson/\">Nelson Minar <nelson@media.mit.edu></a>")