Complete Commentary on the Whole Bible, by Matthew Henry, at sacred-texts.com
David endeavours to still his spirit, with hope and confidence in God.
As to the quarrel God had with David for sin, he prays, Enter not into judgment with me, if Thou doest so I shall be condemned; but as to the quarrel his enemies had with him, he prays, Lord, judge me, and in thy providence appear on my behalf. If we cannot comfort ourselves in God, we may stay ourselves upon him, and may have spiritual supports, when we want spiritual delights. He never cast off any that trusted in him, whatever fears they may have had of their own state. We need desire no more to make us happy, than the good that flow from God's favour, and is included in his promise. Those whom God leads, he leads to his holy hill; those, therefore, who pretend to be led by the Spirit, and yet turn their backs upon ordinance, deceive themselves. We are still to pray for the Spirit of light and truth, who supplies the want of Christ's bodily presence, to guide us in the way to heaven. Whatever we rejoice or triumph in, the Lord must be the joy of it. David applies to God as his never-failing hope. Let us pray earnestly, that the Lord would send forth the truth of his word, and the light of his Spirit, to guide us into the way of holiness, peace, and salvation. The desire of the Christian, like that of the prophet in distress, is to be saved from sin as well as sorrow; to be taught in the way of righteousness by the light of heavenly wisdom, shining in Jesus Christ, and to be led by this light and truth to the New Jerusalem.