Regardless of nationality, people were not particular about the spellings of their surnames until the 20th century. Nor were the records of the time. Therefore, there is a great variety of spellings of any name. For instance, there are over 200 spelling variants of MacMillan.
An example would be the spellings at right, these scanned from a 1794 will of William McMullin. This one document shows his surname spelled four different ways, the variables being the vowels, including two for William himself (one of these has a "u" changed to an "i" by crossing out a vertical stroke). The others, including a William McMillan, are his children.
Surnames weren't employed in Western Europe until the 12th century and then only among the nobility. A man would have been known by his given name and his father’s name, a nickname or a reference to where he lived or was born. Highlanders might not have adopted a surname until the late 18th or early 19th centuries, sometimes only when they emigrated.
Another significant factor in spelling inconsistency was immigrants to the American colonies, later the United States, would often be illiterate. If Scottish Highlanders, they often only have spoken Gaelic or "Erse" as it was then referred to. In either case, the spelling of their name would have been interpreted by an immigration agent.
The "official" spellings of names now consistently applied to Scottish clans, were only beginning to be used in the mid-19th century. Therefore, the descendants of most Scottish immigrants to America would have a different spelling than their clan. A "McDonald" would be no less a member of Clan Donald than a "MacDonald".
Patronymics: the prefix to a name meaning son of.
Relative to a Scottish name a patronymic is often (though not always) "Mc" or "Mac" indicating the name or identity of the progenitor of the clan, the name-father, the person after whom the clan was named. The Irish "O'" derives from "ua" meaning "grandson of". Two examples: ua Niall/O'Neill and ua Domhnall/O'Donnell.
For Scottish Highland clans this "name-father" from whom the clan derives its name was inevitably a nobleman, often descended from royalty. A number of clans have progenitors descended from MacBeth, the last Celtic king of Scotland. Others were descended from Norman nobility.
Examples of patronymics applying to the same clan are MacMillan, O’Millan, and Millanson. Millan is an instance of dropping the patronymic altogether from the same name. This was employed when a family would emigrate outside Scotland, an attempt to make the name appear less ethnic. Other examples of this are MacNeil/O'Neil/Neil and MacDonald/O'Donnell/Donald.