(name, deflt, handle, notOnInit)
| 5160 | var optionHandlers = CodeMirror.optionHandlers = {}; |
| 5161 | |
| 5162 | function option(name, deflt, handle, notOnInit) { |
| 5163 | CodeMirror.defaults[name] = deflt; |
| 5164 | if (handle) optionHandlers[name] = |
| 5165 | notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; |
| 5166 | } |
| 5167 | |
| 5168 | // Passed to option handlers when there is no old value. |
| 5169 | var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; |