wrap `opts.{{g,l}{t,e,te},start,end}` arguments with functions