[Python-bugs-list] [ python-Bugs-830347 ] python-mode.el:
py-b-of-def-or-class looks inside strings
SourceForge.net
noreply at sourceforge.net
Sat Nov 1 15:41:00 EST 2003
Bugs item #830347, was opened at 2003-10-26 03:57
Message generated for change (Comment added) made by dhagglund
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=830347&group_id=5470
Category: Demos and Tools
Group: None
>Status: Closed
Resolution: None
Priority: 5
Submitted By: Dale Hagglund (dhagglund)
Assigned to: Nobody/Anonymous (nobody)
Summary: python-mode.el: py-b-of-def-or-class looks inside strings
Initial Comment:
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-of-def-or-class.
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?
I apologize if this issue has been raised before, but I wasn't able to figure out how to do keyword searches with sourceforge.
----------------------------------------------------------------------
>Comment By: Dale Hagglund (dhagglund)
Date: 2003-11-01 20:41
Message:
Logged In: YES
user_id=895011
Resubmitted to the python-mode project, and closed this one.
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2003-10-27 14:08
Message:
Logged In: YES
user_id=33168
This bug/patch should be submitted to the python-mode
project. Thanks for the patch!
----------------------------------------------------------------------
Comment By: Dale Hagglund (dhagglund)
Date: 2003-10-26 05:32
Message:
Logged In: YES
user_id=895011
I guess I should have waited a bit longer before filing this as a bug. The attached patch resolves this bug for me.
This patch also fixes a minor related bug in py-end-of-def-or-class. If COUNT was greater than zero, the call to py-beginning-of-def-or-class was incorrect.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=830347&group_id=5470
More information about the Python-bugs-list
mailing list