summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Manheimer <klm@digicool.com>2003-03-03 04:05:03 (GMT)
committerKen Manheimer <klm@digicool.com>2003-03-03 04:05:03 (GMT)
commitad428cd1cd3f9d3f9a85da558e1225b4558a4f9b (patch)
treea1965584c1eeea7f1c5ca3869c8b220523c0a8e5
parente7aca521dbea3cba59249a1efe1216891201d704 (diff)
downloadcpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.zip
cpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.tar.gz
cpython-ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b.tar.bz2
Guard advancing past leading meta-comments.
-rw-r--r--Misc/python-mode.el10
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) ?\<)