All actions to try the title or right to any State, county or municipal office shall stand for trial at the next session of court after the summons and complaint have been served for 30 days, regardless of whether issues were joined more than 10 days before the session; and it is the duty of the judge to expedite the trial of these actions and to give them precedence over all others, civil or criminal. It is unlawful to appropriate any public funds to the payment of counsel fees in any such action. (1874-5, c. 173; Code, s. 616; 1901, c. 42; Rev., s. 833; C.S., s. 876; 1947, c. 781; 1971, c. 381, s. 12.)