Make option-setting function generation slightly more concise.