##// END OF EJS Templates
Fix emacs tab-completion with simpler implementation....
andy wilson -
Show More
@@ -456,23 +456,12 b' class IPCompleter(Completer):'
456 self.python_func_kw_matches,
456 self.python_func_kw_matches,
457 ]
457 ]
458
458
459 # Code contributed by Alex Schmolck, for ipython/emacs integration
460 def all_completions(self, text):
459 def all_completions(self, text):
461 """Return all possible completions for the benefit of emacs."""
460 """
462
461 Wrapper around the complete method for the benefit of emacs
463 completions = []
462 and pydb.
464 comp_append = completions.append
463 """
465 try:
464 return self.complete(text)[1]
466 for i in xrange(sys.maxint):
467 res = self.complete(text, i, text)
468 if not res:
469 break
470 comp_append(res)
471 #XXX workaround for ``notDefined.<tab>``
472 except NameError:
473 pass
474 return completions
475 # /end Alex Schmolck code.
476
465
477 def _clean_glob(self,text):
466 def _clean_glob(self,text):
478 return self.glob("%s*" % text)
467 return self.glob("%s*" % text)
General Comments 0
You need to be logged in to leave comments. Login now