]> code.delx.au - gnu-emacs/blobdiff - lisp/newcomment.el
(define-ccl-program): Fix docstring about
[gnu-emacs] / lisp / newcomment.el
index 120777ab704cea80e6fd1929db1386165d77fa5e..5a7b7666e8962445b3f2653c46e5f8a37e493a3f 100644 (file)
@@ -423,7 +423,7 @@ and raises an error or returns nil if NOERROR is non-nil."
 (defun comment-beginning ()
   "Find the beginning of the enclosing comment.
 Returns nil if not inside a comment, else moves point and returns
-the same as `comment-search-forward'."
+the same as `comment-search-backward'."
   ;; HACK ATTACK!
   ;; We should really test `in-string-p' but that can be expensive.
   (unless (eq (get-text-property (point) 'face) 'font-lock-string-face)
@@ -435,7 +435,7 @@ the same as `comment-search-forward'."
              (and
               ;; For modes where comment-start and comment-end are the same,
               ;; the search above may have found a `ce' rather than a `cs'.
-              (or (not (looking-at comment-end-skip))
+              (or (if comment-end-skip (not (looking-at comment-end-skip)))
                   ;; Maybe font-lock knows that it's a `cs'?
                   (eq (get-text-property (match-end 0) 'face)
                       'font-lock-comment-face)
@@ -1087,6 +1087,7 @@ Else, call `comment-indent'."
            (insert (comment-padleft comment-end add)))
          (indent-according-to-mode))))))
 
+;;;###autoload
 (defcustom comment-auto-fill-only-comments nil
   "Non-nil means to only auto-fill inside comments.
 This has no effect in modes that do not define a comment syntax."