void composeTag()
{
	caret = textArea.getCaretPosition();

	text = textArea.getSelectedText();
	if(text == null || text.length()==0 )
    {
        textArea.selectWord();
        text = textArea.getSelectedText();
        if(text == null || text.length()==0 )
            return;
    }

	sb = new StringBuffer();
	sb.append("<").append(text).append(">");
	sb.append("</").append(text).append(">");
	textArea.setSelectedText(sb.toString());
    textArea.setCaretPosition(caret + text.length() + 2);
}

if(buffer.isReadOnly())
	Macros.error(view, "Buffer is read-only.");
else
	composeTag();

/*
	Macro index data (in DocBook format)

<listitem>
    <para><filename>Compose_Tag.bsh</filename></para>
    <abstract><para>
		Creates an HTML tag from the selected text or select current word and then creates the tag.
    </para></abstract>
</listitem>

*/

