The Holy Spirit protects the Church from a pope definitively promulgating for the universal Church an error in a matter of doctrine or morals; he doesn’t necessarily inspire a pope to hold to right doctrine. For more information, please see the links below.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.