Let us remember that the devil labors hard to disturb us at the time of meditation, in order to make us abandon it. Let him, then, who omits mental prayer on account of distractions be persuaded that he gives delight to the devil… let us, then, never give up meditation however great our distractions may be. St. Francis de Sales says that if, in mental prayer, we should do nothing else than continually banish distractions and temptations, the meditation would be very well made. Before him, St. Thomas taught that involuntary distractions do not take away the fruit of mental prayer.
~St. Alphonsus, The Great Means of Salvation and Perfection via Catholic Spiritual Direction