ajaxorg/ace — pull request #1226 by nightwing (2013-01-29 18:53:50+00:00)
Title: better way for managing options

##### problems with the old way
1. most of the code in `set/get` was repeated many times
2. to configure ace one had to use a huge list of function calls, which makes saving and restoring options a pain
now it becomes `editor.setOptions({option1: value1, ...})`

also this adds
```js
config.setDefaultValue(moduleName, optionName, value)
config.setDefaultValue(moduleName, {option1: value1, ...})
config.resetOptions //to reset all options to default values
```
and
```js
config.on("editor", ..)
config.on("renderer", ..)
config.on("session", ..)
```
which will give useful hooks for plugins like multiselect or elastic-tabs

##### open questions
1. should we continue adding `OptionName` for new options?
2. should editor forward session options (tabSize, wrap, softTabs, etc) or not?
there are 3 possibilities for editor.setOption("wrap", true)
- do nothing. (current)
- call `editor.session.setOption("wrap", true)` (this makes api nicer if one doesn't care about sessions)
- set editor.$wrap true and every time session is changed update wrap on session (might be useful if one wants to apply wrap setting to all tabs, but can be unexpected)
i think second one is better