At the end of a buffer, (forward-comment 1) or (forward-comment 999)
returns t. These forms should return nil:
...
If N comments are found as expected, with nothing except whitespace
between them, return t; otherwise return nil.
...
FSF Emacs's version of forward-comment gets this right. Here's a
workaround until a change makes its way into the C source:
;; In XEmacs 20.4, (forward-comment 9999) at the end of a buffer returns t!
(defadvice forward-comment (after forward-comment-eob activate)
(if (and ad-return-value (eobp))
(setq ad-return-value nil)))
-Michael Ernst
mernst(a)cs.washington.edu