If any retired judge shall accept an appointment or an election to a judicial office, he or she shall be entitled to receive the full salary pertaining thereto, and his or her retirement pay under this chapter shall be suspended during such term of office and his or her salary then received shall be subject to contribution to the judges' retirement fund as provided in this chapter.