Go to the previous, next section.
The commands that insert start tags works only if the document has an associated DTD.
A list of valid tags is computed for a postition in the buffer and is used for a menus and completion. The list will contain:
sgml-balanced-tag-edit
is non-nil. Furthermore it will contain end tags for enclosing elements
if sgml-omittag-transparent
is non-nil, and the necessary omitted
end tag declarations has been made in the DTD.
sgml-omittag-transparent
is nil, the above will be limited to
the elements that can occur within the current element.
Another type of computed list is a list of valid element names. This
list is also used for completion. If sgml-omittag-transparent
is
nil, the list will only contain the elements that can be in the content
of the current element.
The commands are:
sgml-insert-tag
)
If the option sgml-balanced-tag-edit
is non-nil, inserting a
start tag will also insert the corresponding end tag. If in addition
sgml-auto-insert-required-elements
is non-nil, tags for elements
required between the inserted tags will also be inserted.
sgml-insert-element
)
Required elements in the content will be automatically inserted if the
option sgml-auto-insert-required-elements
is non-nil.
sgml-tag-region
)
sgml-insert-end-tag
)
Menu bar:
Sub menus:
You can tag a region, with start and end tag, using the `Insert tag' menu. There are two ways to indicate the region to mark:
For this to work you muse either use transient mark mode
(see section 'Transient Mark Mode' in The Emacs Editor.) or set the option sgml-tag-region-if-active
to non-nil
(don't set this unless you are sure that you want it).
User Options
sgml-balanced-tag-edit
sgml-auto-insert-required-elements
sgml-omittag-transparent
sgml-tag-region-if-active
transient-mark-mode
must be on for the region to be tagged.
Go to the previous, next section.