Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix emacs tab-completion in ipython.el and remove the obsolete IPComp…

…leter.all_completions() helper method
  • Loading branch information...
commit 33c2d786959f50d8e9d8e0283ec520e3541b3a44 1 parent e5effe0
@wilsaj authored
Showing with 1 addition and 19 deletions.
  1. +0 −18 IPython/core/completer.py
  2. +1 −1  docs/emacs/ipython.el
View
18 IPython/core/completer.py
@@ -456,24 +456,6 @@ def __init__(self, shell, namespace=None, global_namespace=None,
self.python_func_kw_matches,
]
- # Code contributed by Alex Schmolck, for ipython/emacs integration
- def all_completions(self, text):
- """Return all possible completions for the benefit of emacs."""
-
- completions = []
- comp_append = completions.append
- try:
- for i in xrange(sys.maxint):
- res = self.complete(text, i, text)
- if not res:
- break
- comp_append(res)
- #XXX workaround for ``notDefined.<tab>``
- except NameError:
- pass
- return completions
- # /end Alex Schmolck code.
-
def _clean_glob(self,text):
return self.glob("%s*" % text)
View
2  docs/emacs/ipython.el
@@ -311,7 +311,7 @@ gets converted to:
(replace-match "" t nil)))))
(defvar ipython-completion-command-string
- "print(';'.join(get_ipython().Completer.all_completions('%s'))) #PYTHON-MODE SILENT\n"
+ "print(';'.join(get_ipython().Completer.complete('%s')[1])) #PYTHON-MODE SILENT\n"
"The string send to ipython to query for all possible completions")
Please sign in to comment.
Something went wrong with that request. Please try again.