diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-04-01 19:33:44 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2007-04-01 19:33:44 +0000 |
commit | 5605893d03d128a088eca3ea36af392bf7d111eb (patch) | |
tree | 528369f25645ae28708628b5199a9ebf2d8dab94 /lisp/newcomment.el | |
parent | 15bcde049f2044769a3df1fc6fc7c72aaddf80e0 (diff) | |
download | emacs-5605893d03d128a088eca3ea36af392bf7d111eb.tar.gz |
(comment-search-forward): Discard comment starters before point.
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r-- | lisp/newcomment.el | 4 |
1 files changed, 3 insertions, 1 deletions
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)) |