From ad428cd1cd3f9d3f9a85da558e1225b4558a4f9b Mon Sep 17 00:00:00 2001 From: Ken Manheimer Date: Mon, 3 Mar 2003 04:05:03 +0000 Subject: [PATCH] Guard advancing past leading meta-comments. --- Misc/python-mode.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Misc/python-mode.el b/Misc/python-mode.el index 13070421bbc..c8423f1e573 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) ?\<)