The difference between the "Mc" and the "Mac" has nothing to do with being Scottish or Irish. The spellings just developed along differing lines as people became more literate. Different areas pronounced the 'm', 'c' differently. The accents vary a lot from one area to another in both countries.
For many, many generations, people and families stayed in the area that they were born in. For such small countries land-wise the populations grew where they originated for a long time. You could tell where a person was from simply by their accent. The current times have changed that along the way. But you will still hear the natives pronounce a name "Mac-Gregor", with a long 'a', or "Mc-Gregor", almost with an 'I', (like Mick).
And, of course, the attachment means "son of". The names that have an "O" in front, such as "O'Connor"(for example) are Irish alone.
For many, many generations, people and families stayed in the area that they were born in. For such small countries land-wise the populations grew where they originated for a long time. You could tell where a person was from simply by their accent. The current times have changed that along the way. But you will still hear the natives pronounce a name "Mac-Gregor", with a long 'a', or "Mc-Gregor", almost with an 'I', (like Mick).
And, of course, the attachment means "son of". The names that have an "O" in front, such as "O'Connor"(for example) are Irish alone.