The present paper is a report on joint work with Alessandro Languasco and Alberto Perelli, collected in [10], [11] and [12], on our recent investigations on the Selberg integral and its connections to Montgomery's pair-correlation function. We introduce a more general form of the Selberg integral and connect it to a new pair-correlation function, emphasising its relations to the distribution of prime numbers in short intervals.