Yes, and several leading figures disagreed with this - including the Spanish foreign minister. As I said, it is a very debatable area - not as simple as you stated.
This is at the very least highly debatable. Scotland are currently in the EU as part of the UK; if they become independent of the UK then it could easily be argued that they don't have to leave. The Spanish won't like it but they are not the only member of the EU.