Editing XML (xml-mode) with no DTD in psgml-1.2.1 I see this behaviour:
< f o o > < b a r / > C-c /
inserts '</bar>', ie '<foo><bar/></bar>'
< f o o > < b a r SPC / > C-c /
inserts '</foo>', ie '<foo><bar/></foo>'
For the record, the spec says that empty elements match the production:
EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
In other words that extra space is not required. You get the same behaviour
for empty elements if you have attributes with no space after the last
closing quote. The problem seems to be in the parsing, not just in end-tag:
sgml-show-context displays "#PCDATA in bar in foo in"...(etc) when the point
is after <bar/>.
I'm guessing the problem is in psgml-parse.el's
sgml-parse-attribute-specification...its like something is eating the next
char in an attribute spec, but not restoring the character pushed back
unless its '>'?? I don't understand whats going on in Lennart's code to pin
it down. Anybody?
-Baz
PS funnily enough Mulberry Tech's xsl-mode has a similar problem with /> -
it indents correctly if you put a space before the slash but otherwise gets
it wrong. Hmmm...
I think this is fixed in the latest release (1.2.2)