Better handling of set and \set commands