Subject: bug#12458: 24.2.50; Emacs hangs when Semantic mode is activated and editing Python

From: David Engster <[email-masked]>
Date: Sun, 07 Oct 2012 20:43:10 +0200

Julien Danjou writes:
> I've enabled semantic mode, but as soon as I edit a Python file and gets
> idle, Emacs hangs. It does not matter what's the Python file like, it
> does this in any project. C-g is the only solution to get my cursor
> back. I've enabled debug on quit, and here's a couple of backtrace I
> get:

>   semantic-ctxt-current-assignment-default(nil)

[...]

>   semantic-ctxt-current-function-default(nil)

It seems the default implementations for
semantic-ctxt-current-assignment/function do not work correctly for
Python. I've now introduced new python-mode overrides for these two
functions. They will simply return 'nil', but at least that shouldn't
send Semantic into an infinite loop. It'd be nice if someone could
actually write proper implementations of these semantic-ctxt-* functions
for Python.

Please try latest Emacs-bzr to see if the problem is gone.

-David