From fc8f118610bfe0356b44b86c67c104460bdfddcb Mon Sep 17 00:00:00 2001 From: Matthias BUSSONNIER Date: Mon, 19 Aug 2013 14:11:48 +0200 Subject: [PATCH] store default codemirror mode in only 1 place --- IPython/html/static/notebook/js/cell.js | 4 ++-- IPython/html/static/notebook/js/codecell.js | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/IPython/html/static/notebook/js/cell.js b/IPython/html/static/notebook/js/cell.js index cd1ac7e7e..959f21fbe 100644 --- a/IPython/html/static/notebook/js/cell.js +++ b/IPython/html/static/notebook/js/cell.js @@ -322,8 +322,8 @@ var IPython = (function (IPython) { } } } - // fallback on default (python) - var default_mode = this.default_mode || 'text/plain'; + // fallback on default + var default_mode = this._options.cm_config.mode || 'text/plain'; this.code_mirror.setOption('mode', default_mode); }; diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index 421bbbeae..9c18cafe5 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -65,7 +65,6 @@ var IPython = (function (IPython) { this.code_mirror = null; this.input_prompt_number = null; this.collapsed = false; - this.default_mode = 'ipython'; this.cell_type = "code";