diff options
Diffstat (limited to 'lisp/progmodes/python.el')
| -rw-r--r-- | lisp/progmodes/python.el | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index a42e2b2a28a..2dc0441bd47 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -4537,6 +4537,13 @@ def __PYTHON_EL_native_completion_setup(): | |||
| 4537 | if not is_ipython: | 4537 | if not is_ipython: |
| 4538 | readline.set_completer(new_completer) | 4538 | readline.set_completer(new_completer) |
| 4539 | else: | 4539 | else: |
| 4540 | # Ensure that rlcompleter.__main__ and __main__ are identical. | ||
| 4541 | # (Bug#76205) | ||
| 4542 | import sys | ||
| 4543 | try: | ||
| 4544 | sys.modules['rlcompleter'].__main__ = sys.modules['__main__'] | ||
| 4545 | except KeyError: | ||
| 4546 | pass | ||
| 4540 | # Try both initializations to cope with all IPython versions. | 4547 | # Try both initializations to cope with all IPython versions. |
| 4541 | # This works fine for IPython 3.x but not for earlier: | 4548 | # This works fine for IPython 3.x but not for earlier: |
| 4542 | readline.set_completer(new_completer) | 4549 | readline.set_completer(new_completer) |