bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bugfix: python.el: completion in inferior python


From: Martin Svenson
Subject: bugfix: python.el: completion in inferior python
Date: Wed, 16 Jan 2008 14:54:35 +0100
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Hello,

I've fixed a small "bug" that affects, among others, python-complete-symbol in the inferior python buffer.

Problem (and solution):
When doing python-complete-symbol in the inferior python buffer, emacs freezes. This is due to a while-loop in python-symbol-completions that never gets any input, because the python process signals an error that python-imports is nil (because we're not in an python-edit-buffer). The correct value of python-imports in an unknown context should not be nil (as in current version), but "None", which makes things work smoothly and as expected.

P.S. This is my first time sending a patch to an open-source project. I apolgize if my message does not conform with etiquette.

// Martin

*** python.el.old       Wed Jan 16 14:29:04 2008
--- python.el   Wed Jan 16 14:46:58 2008
***************
*** 1848,1854 ****
  
  ;;;; Completion.
  
! (defvar python-imports nil
    "String of top-level import statements updated by `python-find-imports'.")
  (make-variable-buffer-local 'python-imports)
  
--- 1848,1854 ----
  
  ;;;; Completion.
  
! (defvar python-imports "None"
    "String of top-level import statements updated by `python-find-imports'.")
  (make-variable-buffer-local 'python-imports)
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]