comment-region-function

comment-region-function is a variable defined in `newcomment.el'.
Its value is
comment-region-default

  • This variable may be risky if used as a file-local variable.

Documentation:
Function to comment a region.
Its args are the same as those of `comment-region', but BEG and END are
guaranteed to be correctly ordered. It is called within `save-excursion'.

Applicable at least in modes for languages like fixed-format Fortran where
comments always start in column zero.