Subject: Re: bug#14303: 24.3; Bug in comment-search-backward

From: Stefan Monnier <[email-masked]>
Date: Fri, 17 May 2013 09:26:37 -0400

> +    (while (and (not found) (re-search-backward comment-start-skip limit t))
> +      (setq end (match-end 0))
> +      (unless (and comment-use-syntax (nth 8 (syntax-ppss)))
> +	(setq found t)))

BTW, a useful idiom for such loops is the "empty body" while loop.

      (while (and (re-search-backward comment-start-skip limit t)
                  (progn
                    (setq end (match-end 0))
                    (and comment-use-syntax (nth 8 (syntax-ppss))))))

-- Stefan