# HG changeset patch # User Stefan Monnier # Date 1175456024 0 # Node ID d703606e395a2c910536c343e3d6b6986cb609f7 # Parent e4d2810db0e9f6352586bda650d5bf6c7c73a1b0 (comment-search-forward): Discard comment starters before point. diff -r e4d2810db0e9 -r d703606e395a lisp/newcomment.el --- a/lisp/newcomment.el Sun Apr 01 18:11:15 2007 +0000 +++ b/lisp/newcomment.el Sun Apr 01 19:33:44 2007 +0000 @@ -391,7 +391,9 @@ 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))