An offense committed, and a penalty or forfeiture incurred, previous to the time when the Mississippi Code of 1972 shall take effect, and an indictment or prosecution for any offense, or for the recovery of any penalty or forfeiture, pending at the time when the Mississippi Code of 1972 shall take effect, shall not be affected by its adoption; but all such offenses, penalties, and forfeitures shall remain subject to the laws in force before the Mississippi Code of 1972 shall take effect, except that all the proceedings had thereafter shall be conducted according to the provisions thereof, and except that when any punishment, penalty, or forfeiture shall have been mitigated by the provisions of the Mississippi Code of 1972, such provisions may be applied to any judgment to be pronounced after the Mississippi Code of 1972 shall take effect.