complete on % for magic in notebook

fixes 3954

Ping @ivanov, just to be sure it does not break master.