Hoo boy, is there a lot to the setting in this novel. It takes place in Scotland (Robert Louis Stevenson's home country) in the year 1751, six years after the last major Jacobite uprising of the Highland clans against the English throne. (For more on this, see our summary of Chapter 9.) Scotland at this time is being actively subdued by the English military. To clamp down on clans wanting independence, the English have started imposing laws on Highlanders to prevent them from carrying or owning weapons and wearing traditional Highland dress (since such clothing marks their clan affiliation).
This is kind of a romantic point in Scottish history, when the last days of traditional clan life are still in living memory. The novel is full of nostalgia for this old Scotland – which the English are doing their best to destroy – when people still regularly spoke better Gaelic than English, and the countryside was full of rebel outlaws hiding from the English.
On the other hand, our protagonist is a Lowlander and firmly loyal to the English throne. So while there's a fair amount of admiration for the Highland rebels ("if these are the wild Highlanders, I could wish my own folk wilder" (15.13), writes Davie), ultimately, Davie does return to the Lowlands with Alan in tow. Davie is a stranger to the Highlands, and his introduction to this unfamiliar country is as intriguing to him as it is to the reader. (For more on Davie's interactions with Scotland, check out his "Character Analysis.")
By the way, we just can't miss this opportunity to recommend that, as you read this novel, you consult a map of Scotland (like this one). It will really make the story easier to follow. Stevenson is incredibly anal about getting both his geographical and historical facts straight, so it's possible to trace the (fictional) route that Davie and Alan are supposed to have traveled around the northwest of Scotland. By including so much detail in a fictional adventure story, Stevenson increases the plausibility of what might otherwise seem like a pretty far-fetched story of shipwreck, conspiracy, and murder.