Copy codemirror mode configuration instead of changing it

If we change it, the modified (wrong) mode is saved in the notebook, which
wrecks havoc on highlighting once the notebook is saved and reopened.