A general discounting time-inconsistent stochastic linear-quadratic optimal control problem is considered for a jump-diffusion stochastic differential equation with random coefficients. Specially, all the weighting coefficients in the state equation as well as in the cost functional are assumed to be general stochastic processes adapted to the filtration generated by a Markov chain. Closed-loop equilibrium operator is studied in this paper whose existence is characterized in terms of the unique solution to a flow of regime-switching backward stochastic Riccati differential equations.