On September 2nd, 1773, Johnson and Boswell reached the Isle of Skye. MacDonald territory. They were to meet Flora MacDonald, who helped the Bonnie Prince Charlie escape; more on that in another post.
The Isle of Skye has hidden more than one famous fugitive. Scott was inspired by the story of Robert the Bruce's evasive journey, after killing John Comyn. Bruce was forced into hiding, not long after murdering Comyn, and being crowned King of Scotland (1306). He probably fled to Ireland, and returned to the mainland in 1307.
Scott visited Skye twice, first on his trip to the Western Isles, and later (1814) he joined the Commissioners for the Northern Lighthouse Service on their rounds in the Western Isles. That trip included Robert Louis Stevenson's grandfather (also Robert). This latter trip provided fodder for his Lord of the Isles, inspired by Bruce's flight and return.