Function: comment-add

comment-add is a byte-compiled function defined in newcomment.el.gz.

Signature

(comment-add ARG)

Documentation

Compute the number of extra comment starter characters.

(Extra semicolons in Lisp mode, extra stars in C mode, etc.)
If ARG is non-nil, just follow ARG. If the comment starter is multi-char, just follow ARG. Otherwise obey comment-add(var)/comment-add(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/newcomment.el.gz
(defun comment-add (arg)
  "Compute the number of extra comment starter characters.
\(Extra semicolons in Lisp mode, extra stars in C mode, etc.)
If ARG is non-nil, just follow ARG.
If the comment starter is multi-char, just follow ARG.
Otherwise obey `comment-add'."
  (if (and (null arg) (= (string-match "[ \t]*\\'" comment-start) 1))
      (* comment-add 1)
    (1- (prefix-numeric-value arg))))