BEWARE cheery associations with global tycoons. Scottish first ministers have not covered themselves with glory here.

But perhaps even the notably unrepentant Jack McConnell and Alex Salmond may be rueing those blissful Manhattan days in the mid-2000s, when they first trod the plush carpets at Trump Tower.

Now the angry white male’s angry white male will soon be making his descent in the Trump Helicopter (or is it the Helitrumpter?). On the day before the EU referendum the US Republican Party’s Presidential candidate is scheduled to visit his Scots golfing Xanadu, Trump Turnberry.

Police and protesters are no doubt both assiduously preparing their manoeuvres. The current FM has set the tone by explictly snubbing the Donald’s visit. Indeed, Nicola has said: “Mr Trump’s views are repugnant, and they clearly do not represent the mainstream views of people across America.”

If the stormclouds of Mordor do eventually gather over 1600 Pennsylvania Avenue sometime after November the 8th this year, that doesn’t leave much diplomatic wriggle-room for Ms Sturgeon.

Not that there should be any wriggle-room, of course. But let’s handle the cruel ironies of recent history as they are dealt to us. Since well before the Scottish Parliament – indeed through long decades of regional economic policy aimed at US oil or electronics, not to mention cultural initiatives like Tartan Day or tomes on “How Scots Invented the Modern World” – smart, successful Scotland has been entertaining its affinities with contemporary America.

We’ve had our historical troubles to bear. The Caledonian influences on the Ku Klux Klan – founded by emigrant Scots cavalry officers within the Confederate Army in 1860, its oaths taken from the Society of the Horseman’s Word in North East Scotland, its burning cross taken from the call to arms by Scottish clans in the 14th century, the Confederate flag formed in a saltire shape – are lurid enough.

Of course, they can be easily outweighed by accounts of how the thinkers of the Scottish Enlightenment shaped the very formation – and democratic idealism – of the US constitution itself.

But here’s where we’re at. A racist, sexist, thuggish authoritarian has a more-than-decent chance of becoming the next US president. He is also the son of a Scots emigre mother, he once said (standing outside her pebble-dash house in Tong, Stornoway) “I have always felt very good about Scotland”, and he has carved out his own wee bit of plaid-trousered recreation business on the Aberdeenshire coast.

So, all power to Hillary Clinton and her unstoppable (or so we’re assured) electoral demographics – women, blacks, Latinos and youth to the rescue. Otherwise, the Scot-spirited nation-branders at Victoria Quay may need to pull out some late nights.

Yet Scots should try to dwell with the meaning of Trump and his support in a more than jokey or cursory way, whether he wins or loses. For instance, are Scots “genetically incapable” (to misquote a recent political sage) of the angry, resentful populism that fuels the Trump phenomenon?

The US commentariat have a variety of despairing positions on Trumpism. One is a “told-you-so” to the Republican Party. If you try to not just oppose, but utterly delegitimate your opponents – the Clinton impeachments, the government shutdowns, the Tea Party and “birther” opposition to Obama’s presidency (the last of which Trump fully supported) – then the result is a general popular contempt for the democratic process.

To which Trump’s simplistic calls for a return to American greatness – “we’re gonna fix” jobs, welfare, security – by virtue of equally simplistic measures (building border walls against Mexicans, repatriating jobs by “cutting better global deals”, expelling or banning Muslims) is a compelling answer.

But an answer for whom, exactly? Another wave of analysis tries to identify that with sociological precision. Some Princeton professors discovered last year that middle-aged white Americans – particularly those with poorer educations – are dying in ever-increasing rates, from booze, drugs and suicide. What’s startling is that this is happening to no other age or ethnic group in the US.

As the New Yorker’s George Packer notes, “these regions of white working-class pain tend to be areas where Trump enjoys strong support ... These Americans know that they’re being left behind, by the economy and by the culture. They sense the indifference or disdain of the winners on the prosperous coasts and in the innovative cities, and it is reciprocated.”

So here’s the question. In a Scotland where the proportions of the population living on or below the relative poverty line haven’t fundamentally changed since the mid-seventies – and where “white working-class pain” isn’t too hard to find – how have we avoided this sociological fate?

How is it that Ukip didn’t get a sniff of a seat in Holyrood this May, proportional representation or no? Why does Scotland look like robustly voting for the EU in June, resisting the “make this island great again/control the immigrants” message of the Leavers?

The answer is one I’ve said before, and will happily repeat. We owe Alex Salmond and his peers an incalculable debt, from the seventies onwards, for so self-consciously forging Scottish nationalism in a left-of-centre, utilitarian and civic fashion. As we look at Trump, or at other European nativist movements and parties – defending their “nations” against various impurities – we should seriously count our blessings in Scotland.

Perhaps those beyond the SNP who once spoke of the “virus of Scottish nationalism”, or insinuated that Scottish governments were not “democracies in the conventional sense”, might wish to quietly examine their consciences? No great expectations there.

But no complacency either, please. One feature of the new composition of Holyrood is that it will hopefully allow a swirl of different centre-left alliances – around taxation, education, land-reform, local empowerment. This third-term SNP government will sometimes find direct allies, but will sometimes find themselves recalled to tougher choices, even with the crabbed limits of a half-powered devo Parliament.

Good: in that sense, the Scottish system has constitutionally checked and balanced itself. However, our American friends are wringing their hands that the wise architecture bequeathed to them by their Founding Fathers is about to fall apart. If it’s Donald Trump who gets the chance to appoint new Justices to the US Supreme Court, what will he perpetrate? What happens to the First Amendment under a man who says, “I don’t want to shoot journalists – but I do hate them”?

We shouldn’t forget how civility, wisdom and tolerance is also a part of the American discourse. I went to see the movie A Hologram For The King this week. Tom Hanks plays a corporate boss on a sales trip to Saudi Arabia, trying to sell the futuristic teleconferencing system in the title to the Saudi Royals. In the sands, tents and mega-developments of the region, he sees his certitudes about US power blow away,

Hanks’ character is haunted by an earlier career decision – to outsource a midwestern bicycle manufacturer’s workforce to China, his grizzled father being one of the blue-collar workers. The movie reminded me very much of a modern Scottish classic, Bill Forsyth’s Local Hero. Hanks’ character, like Burt Lancaster’s, is equally transformed by this mysterious new environment, grappling with the hologram that his own status – and American “greatness” – has become.

Can we imagine a similar mystic epiphany for President Trump as he bestrides his first hole at Turnberry? Scowling at the wind-farms blotting the faint curve of the Earth he now thinks he owns, his hairweave eventually exploding before the roch winds of Menie? No, me neither.

So call all your Sanders-supporting relatives in the US, and urge them to get behind Hillary, no matter their existing reservations.

In short, do what you can. For I fear the Scottish-American relationship may be about to take a nauseating and dangerous turn.

A Hologram for the King is in cinemas now. Pat Kane is a writer and musician (www.patkane.today).