Wrong token if used with htmlmixed mode

It took the token of htmlmixed mode instead of the inner javascript mode, thus autocomplete was not fully functional. Same probelm might occur in xml autocomplete.
Clean up patch 39cc371f986dbf693bbf98931274c82c5afb5411