ipython/ipython — pull request #1082 by Carreau (2011-12-01 11:34:52+00:00)
Title: usability and cross browser compat for completer

Improve notebook completer according to @stefanv feedback

- intercept < backspace > to avoid ff going to previous page when in
completer which is really annoying...
- dissmiss the completer, append what alredy type **Plus** one caracter in
some cases

List of special caracter that are handle are in a given list `()[]./\-+`
for the moment. usefull for exaple when typing :
>>> np.sin(
and not having to type '(' twice.

they are handle separately has the [a-zA-Z] ones because otherwise they
will screw up the regexp, and are opt-in to avoid bugs with invisible
caracters send because some browser have 'keypress' event for meta keys

close #1080

Note to this commit :
list of test for the completer across browser with --pylab=inline flag

#test direct one completion
plt.an -> plt.annotate

#test filter,tab, only one completion
plt.an -> plt.annotate

# test partial common beggining
# test dismmised if user erase
plt.annu -> completer to `aut`
........................................ -> nothing should append
....................................................... -> completer cancelled

#test dismiss if no more completion
plt.sc -> completer 3 choices
...........u -> dismissed whith what user have typed. `plt.scu`

# test dismiss in no completion, special symbol
# opt-in list of caracters +-/\()[].
np.s -> a 'dot' sould dismiss the completer and be appended
.........in( -> np.sin(
np.sin[ -> np.sin[

I'm a little concerned about keyboard mapping also... but at least i'm using it on french keyboard and most of you should be using english one, so if it's incompatible, I'll now it soon...