diff options
author | Ken Manheimer <klm@digicool.com> | 2003-03-03 04:05:03 (GMT) |
---|---|---|
committer | Ken Manheimer <klm@digicool.com> | 2003-03-03 04:05:03 (GMT) |
commit | ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b (patch) | |
tree | a1965584c1eeea7f1c5ca3869c8b220523c0a8e5 | |
parent | e7aca521dbea3cba59249a1efe1216891201d704 (diff) | |
download | cpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.zip cpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.tar.gz cpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.tar.bz2 |
Guard advancing past leading meta-comments.
-rw-r--r-- | Misc/python-mode.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 1307042..c8423f1 100644 --- a/Misc/python-mode.el +++ b/Misc/python-mode.el @@ -1360,10 +1360,12 @@ problem as best as we can determine." (set-buffer funcbuffer) (count-lines (point-min) - (string-match "^\\([^#]\\|#[^#]\\|#$\\)" - (buffer-substring (point-min) - (point-max) - funcbuffer))))))) + (max (point-min) + (string-match "^\\([^#]\\|#[^#]\\|#$\\)" + (buffer-substring (point-min) + (point-max) + funcbuffer)) + )))))) (list lineno funcbuffer)) ((= (elt filename 0) ?\<) |