py-beginning-of-def-or-class looks inside strings
Bug #328781 reported by
Dhagglund
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-mode.el |
Fix Released
|
Medium
|
Andreas Roehler |
Bug Description
[I mistakenly submitted this to the python project first as bug 830374.
Sorry...]
Using python-mode.el 4.6 and gnu emacs 21.1.
To demonstrate this problem:
1. Open the attached file with emacs.
2. Position point at the "#" on the last line.
3. Type `M-C-a', py-beginning-
Point will now be inside the docstring for class x.
py-b-o-d-o-c uses regexps to look backwards for def or class lines. When it
finds a candidate line, should it maybe use partial-parse-sexp to decide if
it's in a string or not?
[http://
Changed in python-mode: | |
status: | New → Fix Committed |
assignee: | nobody → Andreas Roehler (a-roehler) |
Changed in python-mode: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Attach a patch fixing the problem. o-d-o-c in
The patch also fixes an incorrect call to py-beginning-
py-end-o-d-o-c.