Five big makers of snack foods who agreed to the plan said yesterday that they would discourage schools from stocking vending machines with treats that are high in calories, fat, sugar and salt.