According to the 18th-19th century legal writer David Hume (nephew of the philosopher), Scots law distinguished between blasphemy, which was uttered in passion generally in the heat of the moment, and other offences which involved the propagation of ideas contrary to religion.
The Human Rights Act 1998 applies in Scotland as well as England and Wales, and therefore poses similar challenges to the existing Scottish blasphemy laws as those described above.