Variable: comint-accum-marker

Non-nil if you are accumulating input lines to send as input together.
The command M-x comint-accumulate sets this.