In XML mode, xml::electricClosingAngleBracket offers to insert the end-tag of an XML element while typing the closing ">" of the start-tag.
I have noted two issues:
- with prefixed element name (QName), for instance "xsl:param", only "xsl" is inserted in the end tag. It is due to the regexp used for matching the start tag:
regexp -- {[\w]+} $tag tag
l. 511 of Modes/XML Modes/xmlMode.tcl
I think it could be turned into:
regexp -- {[\w]*:?[\w]+} $tag tag
- second ; when typing a start-tag at the very end of a document (the cursor is at the last position), the closing tag is not inserted. I havn't been able to trace the issue. It may be a common situation to enter the root element of a document and to expect it to be closed also.
Best,
Sylvain
Edit : something like :
could be better, since the ":" is supposed to appear only if there is a prefix.
Best regards,
Sylvain
Both issues are fixed now.
Regarding the first one, thanks for the regexp. One can even write just
The second issue was a core bug (an index out of bounds which caused Cocoa to raise an exception and stop processing).
Changes committed to the repository (rev. 1577 (sourceforge.net)). The core must be rebuilt (for the second issue only).