From ed60311a75576cb9fcf6dd80c2026c893cffc221 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 2 Mar 2015 10:29:06 -0800 Subject: [PATCH 1/3] Fix configurability of codecell code cell where actually not configurable, this fixes that + add a convenient methods to dump the content of the configuration in the config file. this also close #7896 by defaulting closebracket to true, which is now configurable :-) It also switches the default magic highlight mode to string so that they could also be configured. --- IPython/html/static/notebook/js/cell.js | 9 ++++- IPython/html/static/notebook/js/codecell.js | 37 +++++++++++++-------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/IPython/html/static/notebook/js/cell.js b/IPython/html/static/notebook/js/cell.js index 1f8f8e146..002f36c66 100644 --- a/IPython/html/static/notebook/js/cell.js +++ b/IPython/html/static/notebook/js/cell.js @@ -567,7 +567,14 @@ define([ // only one key every time but regexp can't be keys... for(var i=0; i').addClass('input_area'); - this.code_mirror = new CodeMirror(input_area.get(0), this.cm_config); + this.code_mirror = new CodeMirror(input_area.get(0), this.class_config.get_sync('cm_config')); // In case of bugs that put the keyboard manager into an inconsistent state, // ensure KM is enabled when CodeMirror is focused: this.code_mirror.on('focus', function () { From 103f2f1df2d11b540b7227f9f2aea2e87603b925 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 2 Mar 2015 10:34:38 -0800 Subject: [PATCH 2/3] Update comment for future removal of code --- IPython/html/static/notebook/js/cell.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/IPython/html/static/notebook/js/cell.js b/IPython/html/static/notebook/js/cell.js index 002f36c66..a9b7fe4b0 100644 --- a/IPython/html/static/notebook/js/cell.js +++ b/IPython/html/static/notebook/js/cell.js @@ -566,10 +566,12 @@ define([ var regs = modes[mode].reg; // only one key every time but regexp can't be keys... for(var i=0; i Date: Mon, 9 Mar 2015 17:54:26 -0700 Subject: [PATCH 3/3] remove private methods --- IPython/html/static/notebook/js/codecell.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/IPython/html/static/notebook/js/codecell.js b/IPython/html/static/notebook/js/codecell.js index bf8daee16..4cfaf85b2 100644 --- a/IPython/html/static/notebook/js/codecell.js +++ b/IPython/html/static/notebook/js/codecell.js @@ -147,17 +147,6 @@ define([ CodeCell.prototype = Object.create(Cell.prototype); - /** - * @private - * Update the current state of the config file in the profile with current config. - **/ - CodeCell.prototype._fill_config_with_current = function(){ - var keys = ['cm_config','highlight_modes']; - for(var i in keys){ - this.class_config.set(keys[i], this.class_config.get_sync(keys[i])); - } - } - /** @method create_element */ CodeCell.prototype.create_element = function () { Cell.prototype.create_element.apply(this, arguments);