From: Ken Manheimer Date: Mon, 3 Mar 2003 04:05:03 +0000 (+0000) Subject: Guard advancing past leading meta-comments. X-Git-Tag: v2.3c1~1615 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b;p=python Guard advancing past leading meta-comments. --- diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 13070421bb..c8423f1e57 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) ?\<)