  html-helper-mode
  Nelson Minar, nelson@media.mit.edu
  Last updated: 7/6/98

  html-helper-mode is an emacs mode to make editing HTML files easier,
  inspired by Marc Andreessen's html-mode. html-helper-mode does most of
  the things that html-mode does, but with a slightly different inter-
  face and lots of new features.  ( Emacs is a super-powerful editor
  that does everything in the world.)
  ______________________________________________________________________

  Table of Contents






















































  1. Installation

     1.1 Notes for various emacsen

  2. About HTML

  3. Documentation

     3.1 Differences between html-mode and html-helper-mode
     3.2 Basic functionality -- inserting cookies
     3.3 Fields
     3.4 Indentation
     3.5 New document skeletons
     3.6 Timestamps
     3.7 Emacs editing support
     3.8 Highlighting
     3.9 Customization

  4. Configuring html-helper-mode

     4.1 Features
     4.2 Indentation variables
     4.3 Hooks
     4.4 Strings
     4.5 Recommended configuration

  5. Keybindings

     5.1 Mode bindings
     5.2 Common insertions
     5.3 HTML insertion commands
        5.3.1 Head elements - C-cC-b
        5.3.2 Headers - C-cC-t
        5.3.3 Anchors - C-cC-a
        5.3.4 Logical styles - C-cC-s
        5.3.5 Physical styles - C-cC-p
        5.3.6 Lists - C-cC-l
        5.3.7 Forms - C-cC-f
        5.3.8 Images - C-cTAB
        5.3.9 Text Elements
        5.3.10 Entities
        5.3.11 Functions C-cC-z

  6. Adding new tags to HTML helper mode

     6.1 Examples
     6.2 About Tags
     6.3 About Types
        6.3.1 html-helper-add-type-to-alist
        6.3.2 html-helper-install-type
        6.3.3 Existing Types
     6.4 Installing Menus
     6.5 About Templates
     6.6 User Contributed HTML tags
        6.6.1 Notes for Contributers

  7. Links

  8. Acknowledgements

  9. Changelog

     9.1 Documentation changes/additions

  10. Todo

  ______________________________________________________________________

  1.  Installation


  If you don't already have them, download:

  o  tempo.el < http://www.santafe.edu/~nelson/hhm-beta/tempo.el >, a
     generic template insertion facility for emacs by David Kgedal.
     (Note that a newer version of this package is probably already
     installed with your copy of emacs.)

  o  html-helper-mode.el <http://www.santafe.edu/~nelson/hhm-beta/html-
     helper-mode.el>, the actual editing mode.

  DOWNLOADING NOTE: some browsers (notably lynx, and some versions of
  netscape) have trouble saving html-helper-mode correctly: they corrupt
  files with long lines. You'll have better luck if you can save the
  file to disk without displaying it first (shift-click in Netscape,
  capital D in lynx). Sorry about that, can't help buggy browsers.

  Put these files in your load-path and byte compile them (if you want).
  Then arrange for html-helper-mode to be loaded: the easiest way is to
  put this in your .emacs:

  ______________________________________________________________________
  (autoload 'html-helper-mode "html-helper-mode" "Yay HTML" t)
  (setq auto-mode-alist (cons '("\\.html$" . html-helper-mode) auto-mode-alist))
  ______________________________________________________________________



  Alternately, you can get an entire distribution of html-helper-mode,
  including these HTML documents, as [link to
  ftp://ftp.reed.edu/pub/src/html-helper-mode.tar.gz removed for the
  moment because linbot was choking on it -- is this file even there?].

  You can find a distribution of this version of the package (with this
  updated documentation) in the http://pobox.com/~jeff.covey/html-
  helper-mode/ directory. There's a tarball there, and an rpm for people
  using redhat package manager-based systems.

  The version of tempo.el I am now distributing is version 1.2.2. There
  are lots of new things in this version: the relevant change here is
  the completion code has been updated to be consistent with post
  emacs-19.26 definitions of the \= regexp token. If completion wasn't
  working before, try this version.  I still have version 1.0 around if
  you need it.

  1.1.  Notes for various emacsen


     GNU emacs 19
        I develop this code under emacs 19.29, so it should work fine
        there. It should work fine on most modern emacs 19s, although
        some not-so-old versions had a different completion behaviour.
        Note if you save your files with C-xC-w (write-file) then local-
        write-file-hooks isn't run, which means timestamps don't update.
        (Even worse, the variable is cleared!).  C-xC-s (save-file) does
        run the hook and the timestamps are updated. I don't understand
        why write-file doesn't run the local-write-file-hooks, but I
        recommend using save-file instead.

     XEmacs 19
        I intend this code to work under XEmacs, and I've heard
        occasional reports that it works.
     GNU emacs 18
        I think this code still works under emacs 18, but you should
        definitely upgrade to 19. Now that the FSF boycott of Apple is
        over, some enterprising person should get cracking on porting
        emacs 19 to the Macintosh.  To run under emacs 18, you will need
        to have a definition of add-hook loaded, and you will need to
        have auc-menu.el installed.


  Special Menu Note: there are two packages that provide the same
  menuing interfaces: auc-menu and easymenu. Unfortunately, they don't
  all work the same.  Recent versions of GNU emacs 19 and XEmacs 19 both
  come with easymenu as part of the standard lisp library. If you are
  having menu troubles, verify that the shipped easymenu is being
  loaded: not any versions of auc-menu or easymenu that you might have
  lying around elsewhere (from auc-tex, in particular). Emacs 18 people
  still need to use auc-menu (which just stubs the functions so they do
  nothing).

  2.  About HTML


  New HTML document writers should read something like the HTML primer
  <http://www.ncsa.uiuc.edu/General/Internet/WWW/HTMLPrimer.html> The
  references at the bottom of the primer are all worth following.  Yahoo
  <http://www.yahoo.com/>has a good index of HTML info on the Web
  <http://www.yahoo.com/Computers_and_Internet/Information_and_Documentation/Data_Formats/HTML/>

  3.  Documentation


  3.1.  Differences between html-mode and html-helper-mode


  There are several similarities between html-helper-mode and html-mode
  This isn't surprising, since my mode was inspired by html-mode. Here's
  an (incomplete) list of the differences:

     Insertion philosophy
        html-mode frequently prompts the user in the minibuffer for the
        data to fill in fields like titles or headers. In html-helper-
        mode, prompting is a user-controlled option.

     Modifying regions
        In html-helper-mode, every command will instead modify the
        region if it is called with a prefix argument.

     Automatic text insertion
        html-helper-mode can automatically insert skeletons for new
        documents and also maintain timestamps.

     Minimal syntax support
        html-helper-mode does its best to tell emacs about the syntax of
        HTML documents.

     Indentation
        html-helper-mode indents nested lists

     Highlighting
        HTML cookies are coloured nicely with hilit19 or font-lock-mode.

     Keymap
        A few obsolete cookies have been removed, a few new cookies have
        been added, and the keybindings have been completely rearranged
        to be compliant with emacs standards.

     Completion
        HTML cookies can be completed in the buffer with M-TAB.

     Missing features
        Some features of html-mode are not included. These include the
        ability to quotify old-style HREFs and automatic naming of
        anchors

  3.2.  Basic functionality -- inserting cookies


  The main function of html-helper-mode is to make it easy to insert
  HTML cookies. html-helper-mode does its best to do this consistently
  and conveniently.  For every HTML and cookie there should be a
  template which contains the text of the cookie itself and information
  as to where the fields are that the user might want to fill in.

  Each template can be activated in one of two ways: by typing the key
  sequence for the cookie, or by completing on the beginning of the
  cookie. For example, C-cC-bt will insert the string <title></title>,
  and position point where you want to type the title. Or, you could
  type <kb and hit M-TAB, and the tag <kbd></kbd> will be inserted.

  If a command is called with a prefix argument (by pressing C-u first),
  then instead of inserting the cookie at the point the cookie is
  inserted around the region. Thus, C-uC-cC-pb will wrap the <b></b>
  token around region, thereby making it bold.

  A complete list of keybindings can be found in the ``keybindings
  ''section. Be warned, there are a lot - you might want to get used to
  completion.

  3.3.  Fields


  More complicated cookies have several fields that need filling in. For
  example, a hyperlink (<a href=""></a>) has two fields - the URL and
  the link description. When a multiple-field cookie is inserted, point
  will be placed at the first field and then the other fields will be
  entered on a special list. M-C-f and M-C-b will make the point skip
  back and forth on this list.

  html-helper-mode can prompt you in the minibuffer for all of the
  fields a cookie need. For example, you can have it ask you to type in
  the URL: and link description fields in a hyperlink. This feature is
  turned off by default - for information on how to turn it on, read
  about ``configuring html-helper-mode''.

  3.4.  Indentation


  HTML documents can have nested lists: these are a bit hard to read in
  source form. html-helper-mode has code to indent lists cookies to the
  appropriate depth depending on how deeply nested the list is. List
  cookies are automatically indented when they are inserted. To indent a
  line by hand, hit TAB.

  The indentation code is a bit of a hack - it doesn't really parse the
  HTML document very carefully. The main restriction is that cookies
  that are parts of lists (for example, <ul> or <li>) should appear at
  the beginning of their lines for the code to work best.

  3.5.  New document skeletons



  When a new HTML document is created, html-helper-mode can insert a
  skeleton with all the tags every HTML document should have. This
  feature is turned off by default - see the documentation for
  ``configuring html-helper-mode ''to turn it on and to customize the
  skeleton.

  3.6.  Timestamps


  Good HTML documents should all have timestamps stating the last time
  they were modified. html-helper-mode can make this easy by
  automatically updating your timestamp. This feature is turned off by
  default - see the documentation for ``configuring html-helper-mode
  ''to turn it on and to customize the timestamp.

  3.7.  Emacs editing support


  One of the joys of emacs is that it is pretty smart about parsing the
  contents of the buffer. However, HTML is fairly outside of the realm
  of what emacs thinks is a programming language, so the syntax support
  html-helper-mode provides isn't that helpful. It does define > as a
  match for <, and emacs knows about HTML comment syntax, so you can
  type M-; to get a comment.

  3.8.  Highlighting


  [note: out-of-date, needs to be updated to reflect current situation.]

  If you have hilit19 loaded in your emacs, then html-helper-mode will
  automatically set up regular expressions to colour links, HTML
  cookies, included images, and comments. I think this is one of the
  most useful features of html-helper-mode.  For these patterns to be
  installed correctly hilit19 must be loaded before html-helper-mode.

  I do not use font-lock, so currently there are no font-lock patterns
  defined.  However, there is user-contributed font-lock code
  <http://www.nbi.dk/TOOLS/emacs/lisp/html-font.el>on the net.

  3.9.  Customization


  Once you have html-helper-mode installed, you probably will want to
  customize a few things. For more information, see the document on
  ``configuring html-helper-mode''.

  4.  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.

  4.1.  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

  By default, the menu is limited so that it starts up quickly.

     html-helper-use-expert-menu
        If t, html-helper-mode always presents you with a full menu of
        everything it can do.

  4.2.  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

  4.3.  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-functions (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.

  4.4.  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

  4.5.  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://nelson.www.media.mit.edu/people/nelson/\">Nelson Minar &lt;nelson@media.mit.edu&gt;</a>")
  ______________________________________________________________________



  5.  Keybindings


  Keybindings for html-helper-mode version 2.19.

  Note - if this list seems not to be up to date, your best bet is to
  look at the mode help for html-helper-mode by typing C-hm from within
  the mode.

  Every keysequence here inserts some HTML cookie. The point is then
  placed where you want to type in the information for that cookie. If
  you call the command with a prefix argument (by typing C-u first),
  then instead the cookie is placed around the current region.

  5.1.  Mode bindings










  ______________________________________________________________________
  TAB         indent line
  RET         insert newline and indent
  M-TAB       complete tag at point
  M-C-f       move forward one mark
  M-C-b       move backward one mark
  C-cC-zt     insert the timestamp delimiter
  ______________________________________________________________________



  5.2.  Common insertions


  ______________________________________________________________________
  M-RET       html-paragraph          <p>
  C-cRET      html-break              <br>
  C-c=        html-horizontal-rule    <hr>
  C-cC-t#     html-header-#           <h#></h#>
  C-cC-al     html-anchor             <a href=""></a>
  C-cC-lu     html-unordered-list     <ul><li></ul>
  C-cC-ld     html-definition-list    <dl><dt><dd></dl>
  C-cC-li     html-smart-insert-item  <li>  or  <dt><dd> depending on context
  ______________________________________________________________________



  5.3.  HTML insertion commands


  Every HTML cookie should have an insertion command. These commands can
  be used in two ways: by typing the beginning of the cookie and hitting
  M-TAB, for completion, or by typing it's somewhat-mnemonic keybinding.

  The keybindings aren't very good - I am constrained by emacs style to
  binding things only to C-cC-<letter>. Each class of HTML cookie is
  assigned to some particular C-cC-<letter>, and then within that map
  different letters insert different cookies.

  ______________________________________________________________________
  Prefix      Cookie class
  ------      ------------
  C-cC-b      head element ("begin")
  C-cC-t      headers ("title" - sorry, C-cC-h has a special meaning in emacs)
  C-cC-a      anchors
  C-cC-s      logical styles ("styles")
  C-cC-p      physical styles
  C-cC-l      lists
  C-cC-n      annotations ("notes")
  C-cC-f      forms
  C-cTAB      images
  special     text elements
  special     entities
  C-c-C-z     functions
  ______________________________________________________________________



  5.3.1.  Head elements - C-cC-b







  ______________________________________________________________________
   key         template                inserted text
   ---         --------                -------------
  B           html-body               <body></body>
  H           html-head               <head></head>
  t           html-title              <title></title>
  i           html-isindex            <isindex>
  n           html-nextid             <nextid>
  l           html-link               <link href="">
  b           html-base               <base href="">
  m           html-meta-name          <meta name="" content="">
  h           http-equivalent         <meta http-equiv="" content="">
  ______________________________________________________________________



  5.3.2.  Headers - C-cC-t


  ______________________________________________________________________
  1           html-header-1           <h1></h1>
  2           html-header-2           <h2></h2>
  3           html-header-3           <h3></h3>
  4           html-header-4           <h4></h4>
  5           html-header-5           <h5></h5>
  6           html-header-6           <h6></h6>
  ______________________________________________________________________



  5.3.3.  Anchors - C-cC-a


  ______________________________________________________________________
  n           html-target-anchor      <a name=""></a>
  l           html-anchor             <a href=""></a>
  ______________________________________________________________________



  5.3.4.  Logical styles - C-cC-s


  ______________________________________________________________________
  p           html-preformatted       <pre></pre>
  b           html-blockquote         <blockquote></blockquote>
  e           html-emphasized         <em></em>
  s           html-strong             <strong></strong>
  c           html-code               <code></code>
  x           html-sample             <samp></samp>
  r           html-citation           <cite></cite>
  k           html-keyboard           <kbd></kbd>
  v           html-variable           <var></var>
  d           html-definition         <dfn></dfn>
  a           html-address            <address></address>
  ______________________________________________________________________



  5.3.5.  Physical styles - C-cC-p






  ______________________________________________________________________
  b           html-bold               <b></b>
  i           html-italic             <i></i>
  u           html-underline          <u></u>
  f           html-fixed              <tt></tt>
  s           html-strikethru         <strike></strike>
  ______________________________________________________________________



  5.3.6.  Lists - C-cC-l


  ______________________________________________________________________
  o           html-ordered-list       <ol><li></ol>
  u           html-unordered-list     <ul><li></ul>
  r           html-directory          <dir><li></dir>
  m           html-menu               <menu><li></menu>
  d           html-definition-list    <dl><dt><dd></dl>
  i           html-smart-insert-item  <li>  or  <dt><dd> depending on context
  l           html-item               <li>
  t           html-definition-item    <dt><dd>
  ______________________________________________________________________



  5.3.7.  Forms - C-cC-f


  ______________________________________________________________________
  f           html-form               <form action="" method=""></form>
  t           html-input-text         <input name="" size="">
  i           html-image-field        <input type="IMAGE" name="" src="">
  c           html-input-checkbox     <input type="CHECKBOX" name="">
  r           html-input-radiobutton  <input type="RADIO" name="">
  b           html-input-submit-form  <input type="SUBMIT" value="">
  z           html-input-reset        <input type="RESET" value="">
  p           html-input-textarea     <textarea name="" rows= cols=></textarea>
  s           html-input-select       <select name=""><option></select>
  v           html-option-with-value  <option value="">
  o           html-option             <option>
  h           html-hidden-field       <input type="HIDDEN" name="" value="">
  ______________________________________________________________________



  5.3.8.  Images - C-cTAB


  ______________________________________________________________________
  i           html-image              <img src="">
  t           html-alt-image          <img alt="" src="">
  a           html-align-image        <img align="" src="">
  e           html-align-alt-image    <img align="" src="" alt="">
  ______________________________________________________________________



  5.3.9.  Text Elements







  ______________________________________________________________________
  M-RET       html-paragraph          <p>
  C-c=        html-horizontal-rule    <hr>
  C-cRET      html-break              <br>
  ______________________________________________________________________



  5.3.10.  Entities


  ______________________________________________________________________
  C-c&        html-ampersand          &amp;
  C-c<        html-less-than          &lt;
  C-c>        html-greater-than       &gt;
  C-cSPC      html-nonbreaking-space  &nbsp;
  C-c-        html-soft-hyphen        &shy;
  C-c@        html-copyright          &copy;
  C-c$        html-registered         &reg;
  C-c"        html-quotation-mark     &quot;
  C-c#        html-ascii-code         &[arbitrary entity inserted here];
  ______________________________________________________________________



  5.3.11.  Functions C-cC-z


  ______________________________________________________________________
  v           browse-url-of-file
  t           insert-timestamp-delimiter-at-point
  ______________________________________________________________________



  6.  Adding new tags to HTML helper mode


  HTML helper mode now supports the ability to add new tags, override
  existing tags, or add entire new classes of tags after the mode is
  loaded. You don't have to modify the sources anymore! This is a great
  convenience for adding in your favourite extensions to HTML, your own
  special macros, or overriding some tags that are currently in the
  mode. It is helpful to know something about lisp to extend the mode,
  but if you don't and you're patient you can probably figure it out
  from the examples.

  6.1.  Examples


  I have a simple test module  <testmodule.el>that is well commented and
  describes how to extend HTML helper mode to add a new tag in an
  existing type, override an existing tag, and add an entire new type
  into the mode. The ``user contributed tags section ''will have useful
  examples. The mode itself also uses these same functions to construct
  the tags it uses, but my fondness for mapcar might make the code a bit
  confusing to read.

  6.2.  About Tags


  The core of HTML helper mode mode is the function html-helper-add-tag:
  this adds a new HTML tag with a tag type, a keybinding, a template, a
  completion string, and an expert menu definition. Here is an example:


  ______________________________________________________________________
  (html-helper-add-tag
  ______________________________________________________________________



  This creates a new tag of type "phys" (more on that in a minute) that
  inserts the text <center></center> when the key C-cC-pc or the menu
  item "Center" is used. It completes on the string <center>. The
  general form for html-helper-add-tag is

  ______________________________________________________________________
  (html-helper-add-tag '(type keybinding completion-string menu-name template))
  ______________________________________________________________________



     type
        the type of tag: more information is ``below''.

     keybinding
        The key to bind the new tag to. This keybinding is relative to
        the prefix map implied by the type: if the type has no prefix
        map, then the keybinding is to html-helper-mode-map.

     completion-string
        the most explicit substring to use when doing completion.  It is
        generally the opening part of the HTML tag.

     menu-name
        the name to put in the menu. It should be a short descriptive
        bit of text about what you're inserting, see existing menus for
        stylistic examples.  (This string is also used to produce the
        symbol for the command. You shouldn't have to worry about that.)

     template
        the strings to insert: for more information on templates, see
        the documentation in tempo.el for tempo-define-template, the
        note here ``about templates'', or just copy the examples here
        and in html-helper-mode.

  6.3.  About Types


  Each tag in HTML helper mode is a member of some "type": types are an
  attempt at grouping all the HTML tags into some logical structure.
  Each type of tag is associated with a keymap prefix and a submenu
  (that is how the prefix C-cC-p was associated to the <center> tag
  mentioned above.) Install a new type only if you're really supporting
  a whole new realm of HTML markup.

  6.3.1.  html-helper-add-type-to-alist


  Before defining tags in a type, the type itself must be defined using
  html-helper-add-type-to-alist.  Here is an example of definining a new
  type:

  ______________________________________________________________________
  (html-helper-add-type-to-alist
  ______________________________________________________________________



  This creates a new tag type called "phys", with a key prefix of \C-
  c\C-p and a menu title of "Insert Physical Styles".
  The general form of html-helper-add-type-to-alist is

  ______________________________________________________________________
  (html-helper-add-type-to-alist
  ______________________________________________________________________



     type
        This is the symbol for your new type.

     keymap-var and menu-var
        These are symbols used to hold the keymap and menu. I recommend
        html-helper-<type>-map and html-helper-<type>-menu,
        respectively.

     keymap-entry
        The key to bind your new type to. Emacs convention dictates this
        be C-cC-letter. If this variable is nil, then all tags of that
        type are bound to the html-helper-mode-map.

     menu-name
        The name to put in the menu. I recommend "Insert <descriptive
        text>".

  6.3.2.  html-helper-install-type


  After a type is defined in the mode, it also has to be installed to
  make it visible. This is done via the function html-helper-install-
  type

  ______________________________________________________________________
  (html-helper-install-type 'phys)
  ______________________________________________________________________



  6.3.3.  Existing Types


  HTML helper mode already has a few types used in the mode. If you're
  truly defining a new type of tag you should create your own type with
  its own keybinding.  But if you're just augmenting an existing type,
  you can simply add to one of these. In any case you should be careful
  not to clobber existing keybindings unless you mean to. Don't forget,
  C-cC-z is also bound to special mode functions.


  ______________________________________________________________________
  Type    Key Prefix      Menu Name
  ----    ----------      --------------------------
  entity  none            Insert Character Entitites
  textel  none            Insert Text Elements
  head    C-cC-b          Insert Structural Elements
  header  C-cC-t          Insert Headers
  anchor  C-cC-a          Insert Hyperlinks
  logical C-cC-s          Insert Logical Styles
  phys    C-cC-p          Insert Physical Styles
  list    C-cC-l          Insert List Elements
  form    C-cC-f          Insert Form Elements
  image   C-cC-i          Insert Inlined Images
  ______________________________________________________________________



  6.4.  Installing Menus


  Once a type is installed, you get the keybindings and menu entries for
  free. But you have to force HTML helper mode to rebuild its menus to
  show all the new tags that have been defined. This is done by
  executing

  ______________________________________________________________________
  (html-helper-rebuild-menu)
  ______________________________________________________________________



  6.5.  About Templates


  Charles Curley <ccurley@wyoming.com> wrote me this documentation about
  templates, in particular prompts. It might be helpful to you.

  ______________________________________________________________________
     ;; On prompts... C^2: It took some time to figure this out... The (p
     ;; "prompt: ") and (r "prompt: ") entries indicate where the prompting
     ;; mode should prompt for a field in the tag. (p ) indicates a
     ;; parameter, such as the color of a <font> tag. (r ) indicates a
     ;; region, where the text to be surrounded by the tag should go, such as
     ;; the text to be turned that color. The difference is this: when
     ;; prompting mode is turned off and the user is surrounding a region
     ;; with the tag, the (r ) (region) parameter indicates where the
     ;; surrounded region will go. The first (p ) (parameter) is where the
     ;; cursor will go, ready to input the first parameter to the tag.
     ;; So when you have prompting on, and use the font with color and size
     ;; tag, put the cursor where you want the modified text to go. Start
     ;; inserting the tag. You will be prompted for the color, the size, and
     ;; then the text to display that way. When you have prompting turned
     ;; off, and don't have a region blocked, insert the font tag, and the
     ;; cursor will be at the the first parameter. Then tab over to the
     ;; space between the two parts of the tag, and type in your text. If
     ;; you have region blocked, C-u followed by the tag will surround the
     ;; region with the tag. The blocked region goes into the (r )
     ;; parameter. Then the cursor is placed at the first (p ) location,
     ;; ready for you to type in a parameter, such as the color of the text.
  ______________________________________________________________________



  6.6.  User Contributed HTML tags


  These user-contributed extensions to HTML helper mode come with no
  guarantees. They should work, and they might well add things you'd
  like to have in the mode. To use an extension, load the extension
  after html-helper-mode has been loaded via something like

  ______________________________________________________________________
  (add-hook 'html-helper-load-hook (function (lambda () (load "some-extension.el"))))
  ______________________________________________________________________



  o  tables <tables.el>, by Joe Hildebrand <hildjj@idaho.fuentez.com>.


  o  My silly example <testmodule.el>.


  o  netscape extensions <hhm-netscape.el>, by Marc Hedlund <
     marc@precipice.org> (this is out of date and doesn't work with
     newer versions of html-helper-mode.)


  6.6.1.  Notes for Contributers


  If you have a nice HTML helper mode extension you think is generally
  useful, please send me mail and tell me and I'll add it here. I would
  prefer if you just gave me a URL for your own page with your
  extension, but I can also serve your extension directly from here.
  Also, please try to coordinate with the html-helper-mode-map and the
  emacs conventions. It is best to bind to a C-cC-letter combination
  that is not already used.

  7.  Links


  You can get there from here...

  o  The html-helper-mode homepage
     <http://www.santafe.edu/~nelson/tools/>.

  o  The official ftp site  <ftp://ftp.lysator.liu.se/pub/emacs/>for
     tempo.el <ftp://ftp.lysator.liu.se/pub/emacs/tempo.el >

  o  User contributed font-lock support
     <http://www.nbi.dk/TOOLS/emacs/lisp/html-font.el >

  8.  Acknowledgements


  Many thanks to David Kgedal <http://www.lysator.liu.se/~davidk>  <
  davidk@lysator.liu.se > for coming along at just the right time with
  tempo.el, the basic template code that underlies html-helper-mode.
  Many of the neat features like completion and field support are
  because of his good design and programming.

  Thanks to Ulrik Dickow <http://www.nbi.dk/~dickow/>  for his font-lock
  code.

  Thanks to the author of cc-mode, Barry Warsaw <
  baw@anthem.nlm.nih.gov>, his code provided a useful guide in writing
  this mode (not to mention saving me many hours of formatting C, C++,
  and Objective C!)

  My appreciation to Marc Andreessen < marca@netscape.com>, the author
  of the original html-mode.

  Thanks to jeff covey <http://pobox.com/~jeff.covey>  for updating and
  maintaining the documentation.

  And finally, many thanks to the various people on the net who have
  been offering encouragement, suggestions, and example code. Y'all're
  the main reason I'm writing this, and the main reason it's usable.

  9.  Changelog


  2.19

  o  Added html-helper-mode-version, changed the version identification
     in the comments.


  2.18

  o  small change to hilit19 entity pattern

  o  changed html-helper-htmldtd-version meaning to include the entire
     comment.


  2.17

  o  Added table indentation

  2.16

  o  Updated Ulriks' font-lock code.

  2.15

  o  Added in Ulrik Dickow's font-lock support. Many thanks to him for
     his great work and infinite patience.

  2.14

  o  Got rid of </p>, </li>, </dd>, </dt>. Best as I can tell, these are
     optional and too confusing. I might make them into an add-on
     package.

  2.13

  o  Changed all references to "cookie" into "tag"

  o  Cleaned up doc strings

  o  Fixed dumb easy-menu bug (affects XEmacs)

  o  Look at html-helper-user-menu when building expert menu, allow
     users to add things in.

  2.12

  o  Better loading of easymenu and/or auc-menu

  o  Change logic for checking if browse-url, hilit19 are loaded

  o  Bind 'browse-url-at-point into keymap and menu

  o  More hilit19 regexp changes

  o  Call (easy-menu-add) and (easy-menu-remove) at the right times.

  2.11

  o  More hilit19 changes: do comments right, change <h#> colouring


  o  Moved timestamp-delimiter to C-cC-zt and browse-url-of-file to C-
     cC-zv to make things better.

  o  Mucked with menus: verbified, added in timestamps and toggling to
     expert menu.

  2.10

  o  a bit more hilit19 code: headers, titles, forms (no logical styles)


  o  move headers back from C-cC-h to C-cC-t. Sorry.

  o  Update tempo insertions from (p . foo) to (p foo)

  o  now looks in features to check for hilit19

  o  if you have 'browse-url loaded (forthcoming code) then M-C-q and a
     menu item will bring up your current file in your browser. There's
     also url-at-point, but we'll leave that to the user to bind. Should
     we save file first? Probably no.

  o  skeletons and timestamps now on by default

  2.9 - menu cleanups

  o  Added in a novice menu, on by default.

  o  Cleaned up the menu presentation

  o  MAJOR CHANGE in the cookie format: the 3rd argument is now the menu
     string (it is also coerced into a symbol to make the function.)

  2.8 - new indentation code

  o  Added in html-helper-htmldtd-version for the skeleton

  o  moved headers to C-cC-h to make C-cC-t free (why not before?)

  o  run text-mode-hook, html-mode-hook, html-load-hook

  o  change indentation logic around to make it clearer

  o  new type of list item, end of items

  o  give <select> and <option> stuff indentation like lists

  o  new form cookies, courtesy of Marc

  2.7 - HTML/2.0 compliance

  o  Added full HTML/2.0 compliance: removed old tags, added in new
     ones. Thanks, Marc!

  2.6 - emacs18 added in again

  o  Added back in emacs18 support, grudgingly. emacs18ers need auc-
     menu.el installed as "easymenu.el", and some version of the add-
     hook function.

  o  Changed the paragraph tag to include a newline

  2.5 - modularization

  o  Added quot and # entities

  o  Made <p>, <li>, <dd>, <dt> containers. Bleah!

  o  Removed extraneous whitespace from <li>, etc. Changed default
     indentation to account for this.

  o  Removed emacs18 support (sorry! Time for you to upgrade.)

  o  Reworked the keymap and menu scheme so types are modular, you can
     add them later.. Lots or reorganization of code, reordered cookie
     database, etc.

  2.4 - stupid bug fixes

  2.3 - menus

  o  Updated my location to @santafe.edu

  o  Added menu support (using easymenu)

  o  Changed format of cookie database a bit, renamed a few cookies

  o  Added timezone to timestamp

  2.2 - rms cleanups

  o  Improved docstrings, (provide 'html-mode) for 14 character
     filenames

  2.0 - first official release

  Changes:

  o  Added more image cookie options

  1.34 - Second beta release

  New features:

  o  switched from boilerplate to tempo.

  o  cookies can now be more powerful (see tempo.el)

  o  optional prompting for fields

  o  M-C-b and M-C-f move between fields

  o  completion of cookies on M-TAB

  o  hook called on insertion

  o  indentation of lists HTML+ cookies (courtesy of David Kgedal)

  o  user control over what sort of timestamp is inserted

  Changes:

  o  New timestamp format (use M-C-t to insert the new delimiter)

  o  New keybindings, compliant with emacs coding standards but awkward
     to type.


  o  more HTML compliant initial skeleton

  1.13 - Original beta release

  9.1.  Documentation changes/additions


  by jeff covey < jeff.covey@pobox.com>

  7/6/98

  o  reordered the changelog to reverse chronological order for
     convenience.


  5/29/98

  o  documented html-helper-use-expert-menu.

  o  changed documentation of C-c- and C-c= to reflect their current
     bindings.

  o  added C-c@ C-c$ C-c" C-c# to entity keybindings.

  o  changed html-helper-image-map binding to C-cTAB from C-cC-i.

  o  added section on keybindings of functions (C-cC-z).

  o  added to C-cC-b:

     ___________________________________________________________________
     B           html-body               <body></body>
     H           html-head               <head></head>
     m           html-meta-name          <meta name="" content="">
     h           http-equivalent         <meta http-equiv="" content="">
     ___________________________________________________________________



  o  replaced C-cC-px with its current binding, C-cC-ps.

  o  replaced C-cC-fx with C-cC-fz and C-cC-fc with C-cC-fs.

  o  removed these because they're neither part of html-helper-mode nor
     the html 4.0 specification anymore:

     ___________________________________________________________________
     Annotations - C-cC-n
     a           html-abstract           <abstract></abstract>
     n           html-note               <note role=""></note>
     f           html-footnote           <footnote></footnote>
     m           html-margin             <margin></margin>
     ___________________________________________________________________



  ______________________________________________________________________
  Logical styles - C-cC-s
  n           html-person             <person></person>
  m           html-cmd                <cmd></cmd>
  g           html-arg                <arg></arg>
  l           html-lit                <lit></lit>
  ______________________________________________________________________



  ______________________________________________________________________
  Physical styles - C-cC-p
  r           html-render             <render tag="" style="">
  ______________________________________________________________________



  ______________________________________________________________________
  Forms - C-cC-f
  .           html-input-float        <input type="FLOAT" name="" size="">
  d           html-input-date         <input type="DATE" name="" size="">
  u           html-input-url          <input type="URL" name="" size="">
  a           html-input-audio        <input type="AUDIO" name="">
  ______________________________________________________________________

  o  these have been removed from the documentation because they're no
     longer in the code. however, they are valid html 4.0 entities, so
     they should be put back in:

     ___________________________________________________________________
     Logical Styles - C-cC-s:
     q           html-quote              <q></q>
     y           html-acronym            <acronym></acronym>
     .           html-abbrev             <abbrev></abbrev>
     ___________________________________________________________________



  ______________________________________________________________________
  Physical Styles - C-cC-p
  ^           html-superscript        <sup></sup>
  _           html-subscript          <sub></sub>
  ______________________________________________________________________



  10.  Todo


  o  fix problems in the lyx/sgml-tools-based documentation:

  o  find out why the info file doesn't display < and >, and why a node
     or two is missing.  figured out the last part, anyway: info doesn't
     like colons in node names, so i renamed "Basic functionality:
     inserting cookies" to "Basic functionality -- inserting cookies".]

  o  find out why all those spaces are at the top and bottom of the text
     version.

  o  find out why the postscript version doesn't handle tildes in urls
     properly.

  o  find out why the text converter doesn't handle line breaks in code
     (see section 6.3.1 of the text version).

  o  see how closely the keybindings section actually matches C-hm

  o  find a home for these files and update the "Source:" section of the
     rpm spec file to match it.

  o  M-C-f M-C-b M-t -- do these really work as advertised? the first
     two seem to either not move anywhere or skip over a bunch of tags,
     the last is still defined as transpose-words instead of tempo-
     complete-tag

  o  likewise, M-C-t is bound to transpose-sexps rather than something
     that would insert a timestamp. i replaced it in the keybindings
     table with C-cC-zt, which i'm guessing does the same thing M-C-t
     used to do.

  o  check names of functions against their names as listed in the
     keybindings table.

  o  consider using write-contents-hooks

  o  fix indentation code to handle tag attributes (quick fix - match
     "<li" instead of "<li>", but that has bad potential consequences).

  o  decide about doctype string (2.0, 3.0, some hybrid?)


  o  decide about </li> and </p>

  o  update docs

  o  Document new features (Based on changelog): configuration, et al.

  o  how to deal with browse-url

  o  explain how to do upcasing of tags (ick)

  o  explain which HTML spec we're using.

  o  hints for European character sets (iso-acc mode, no need to do
     anything HTML specific). Link
     http://ppewww.ph.gla.ac.uk/%7Eflavell/iso8859/iso8859-pointers.html



















































