From: Dan Davison Date: Thu, 17 May 2012 03:03:30 +0000 (-0300) Subject: Don't request completions for zero-length input X-Git-Tag: emacs-24.2.90~1199^2~523 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9a5fc059730c7c28808b8ead58c8b1d370670a8d;p=emacs.git Don't request completions for zero-length input Fixes a bug in which incorrect completion output was displayed, for example when point was after a closing paren. --- diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f75b5cb51ae..47bdef2c928 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1633,8 +1633,9 @@ completions on the current context." (string-match "^\\(from\\|import\\)[ \t]" line)) (python-shell-completion--get-completions line process python-shell-module-completion-string-code) - (python-shell-completion--get-completions - input process python-shell-completion-string-code))) + (and (> (length input) 0) + (python-shell-completion--get-completions + input process python-shell-completion-string-code)))) (completion (when completions (try-completion input completions)))) (cond ((eq completion t)