]> git.eshelyaron.com Git - emacs.git/commitdiff
(comment-search-forward): Discard comment starters before point.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 1 Apr 2007 19:33:44 +0000 (19:33 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 1 Apr 2007 19:33:44 +0000 (19:33 +0000)
lisp/newcomment.el

index 7fce0f7bde8c1679ecdeb3e9d828dc4d33503af5..b0a166465fa60f0cda3665aa7f2e59ccdcff11a3 100644 (file)
@@ -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))