Subject: 24.3.50; python-nav-backward-sexp mishandles string movement

From: Jorgen Schaefer <[email-masked]>
Date: Thu, 07 Feb 2013 00:50:46 +0100

Hello!
In python-mode, I get the following behavior (with _|_ being point):

-----
def foo():
    bar = "bar"
    baz = "baz"_|_

=>

_|_def foo():
    bar = "bar"
    baz = "baz"
-----

I would have expected point to move to the beginning of the string, not
to the beginning of def.

I also get this:

-----
def foo():
    bar = "bar"_|_
    baz = "baz"

=>

def foo():
    _|_bar = "bar"
    baz = "baz"
-----

Again, I would have expected point to end up in front of the string, not
the beginning of the statement.

python-mode sets forward-sexp-function, so these operations are done
when using C-M-b (and C-M-f), which is very counterintuitive to me.

Regards,
        -- Jorgen