No it affects both. You will only have spells that is on the persondata. If you change your old spells then your old spells will be gone regardless if you learned it and will be replaced with what you changed. That's why changes on spells don't stick and also why you can't change it in the save...