comparison lisp/newcomment.el @ 76879:d703606e395a

(comment-search-forward): Discard comment starters before point.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 01 Apr 2007 19:33:44 +0000
parents e3694f1cb928
children 9355f9b7bbff 52034b3003ea 4ef881a120fe
comparison
equal deleted inserted replaced
76878:e4d2810db0e9 76879:d703606e395a
389 ;; works better when we assume that pt is inside a string. 389 ;; works better when we assume that pt is inside a string.
390 (setq s (parse-partial-sexp 390 (setq s (parse-partial-sexp
391 pt (or limit (point-max)) nil nil 391 pt (or limit (point-max)) nil nil
392 (list nil nil nil (nth 3 s) nil nil nil nil) 392 (list nil nil nil (nth 3 s) nil nil nil nil)
393 t))) 393 t)))
394 (if (not (and (nth 8 s) (not (nth 3 s)))) 394 (if (or (not (and (nth 8 s) (not (nth 3 s))))
395 ;; Make sure the comment starts after PT.
396 (< (nth 8 s) pt))
395 (unless noerror (error "No comment")) 397 (unless noerror (error "No comment"))
396 ;; We found the comment. 398 ;; We found the comment.
397 (let ((pos (point)) 399 (let ((pos (point))
398 (start (nth 8 s)) 400 (start (nth 8 s))
399 (bol (line-beginning-position)) 401 (bol (line-beginning-position))