(name, deflt, handle, notOnInit)
| 5348 | var optionHandlers = CodeMirror.optionHandlers = {}; |
| 5349 | |
| 5350 | function option(name, deflt, handle, notOnInit) { |
| 5351 | CodeMirror.defaults[name] = deflt; |
| 5352 | if (handle) optionHandlers[name] = |
| 5353 | notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; |
| 5354 | } |
| 5355 | |
| 5356 | // Passed to option handlers when there is no old value. |
| 5357 | var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; |