Function: comment-or-uncomment-region
comment-or-uncomment-region is an interactive and byte-compiled
function defined in newcomment.el.gz.
Signature
(comment-or-uncomment-region BEG END &optional ARG)
Documentation
Call comment-region, unless the region only consists of comments,
in which case call uncomment-region. If a prefix arg is given, it
is passed on to the respective function.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/newcomment.el.gz
;;;###autoload
(defun comment-or-uncomment-region (beg end &optional arg)
"Call `comment-region', unless the region only consists of comments,
in which case call `uncomment-region'. If a prefix arg is given, it
is passed on to the respective function."
(interactive "*r\nP")
(comment-normalize-vars)
(funcall (if (comment-only-p beg end)
'uncomment-region 'comment-region)
beg end arg))