As he was nearing the end of his 36-year legal career with the attorney general’s office, Donald M. Longley took a hard look at the statutes governing state employees’ pensions.

As he saw it, the 120 days of vacation time that he didn’t take should not only be repaid in a cash bump in his final year of work, it should also substantially increase his annual state pension, from $90,600 to $99,700, for the rest of his life.