ipython/ipython — pull request #2216 by Carreau (2012-07-28 16:07:45+00:00)
Title: Autochange highlight with cell magics

Highlight change is made at focus in/out and cell load.
For now, it recognizes `%%javascript`, `%%python[3]`, `%%ruby`, `%%bash` , `%%R`, `%%perl`.

The trickiest part is to switch CM highlight mode on the file beween 'text/plain' and something else.
There is a bug for switch between some highlight mode so CM is monkeypatched.