He was also a cabinet minister in both Margaret Thatcher 's and John Major 's governments .
Prior to that , he held a number of cabinet posts in the governments of Margaret Thatcher and John Major .