From: Stefan Monnier Date: Sun, 1 Apr 2007 19:33:44 +0000 (+0000) Subject: (comment-search-forward): Discard comment starters before point. X-Git-Tag: emacs-pretest-22.0.97~48 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=5605893d03d128a088eca3ea36af392bf7d111eb;p=emacs.git (comment-search-forward): Discard comment starters before point. --- diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 7fce0f7bde8..b0a166465fa 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -391,7 +391,9 @@ and raises an error or returns nil if NOERROR is non-nil." pt (or limit (point-max)) nil nil (list nil nil nil (nth 3 s) nil nil nil nil) t))) - (if (not (and (nth 8 s) (not (nth 3 s)))) + (if (or (not (and (nth 8 s) (not (nth 3 s)))) + ;; Make sure the comment starts after PT. + (< (nth 8 s) pt)) (unless noerror (error "No comment")) ;; We found the comment. (let ((pos (point))