I was getting the wrong auto-close \end{...} tags when I pressed apple-option-. in my LaTeX document.<br><br>The problem turns out to be caused by a bug (or design flaw) in the helper script "$TM_SUPPORT_PATH/bin/checknest.rb", which only recognises a single delimeter per line: in a few places I have a short environment on a single line.
<br><br>I have applied the attached patch to my copy. I admit that I haven't tested it especially thoroughly, but it seems to work for me.<br><br>I hope this is useful.<br><br>Robin<br>