I spent the weekend in Lyon, at a crime writing festival that feted writers from all over the world in exchange for us engaging in panel discussions about thought-provoking and wide-ranging topics. They take crime fiction seriously in France – I was asked questions about geopolitics, and the function of fear. I found myself saying things like “escaping the hegemony of the metropolis” in relation to British crime writing in the 1980s.

What they are also deeply interested in is the place of politics in literature. Over the weekend, there were local elections in France, and a thin murmur of unease ran through many of the off-stage conversations with my French friends and colleagues. They were anxious about the renaissance of the right, of the return of Nicolas Sarkozy, the failure of the left and the creeping rise of the Front National.

As my compatriot Ian Rankin pointed out, the current preoccupations of the crime novel, the roman noir, the krimi lean to the left. It’s critical of the status quo, sometimes overtly, sometimes more subtly. It often gives a voice to characters who are not comfortably established in the world – immigrants, sex workers, the poor, the old. The dispossessed and the people who don’t vote.

The thriller, on the other hand, tends towards the conservative, probably because the threat implicit in the thriller is the world turned upside down, the idea of being stripped of what matters to you. And as Bob Dylan reminds us, “When you ain’t got nothing, you got nothing to lose.”

Of course, these positions don’t usually hit the reader over the head like a party political broadcast. If it is not subtle, all you succeed in doing is turning off readers in their droves. Our views generally slip into our work precisely because they are our views, because they inform our perspective and because they’re how we interpret the world, not because we have any desire to convert our readership to our perspective.

Except, of course, that sometimes we do.

I started publishing crime fiction in 1987. My heroine was a Scottish lesbian journalist, a character who was never going to appeal to a big commercial publisher. (This was back in the days when publishers really did say: “But why on earth would anyone want to read a book set in Glasgow/Manchester/Nottingham?”) So I was published by a small indie feminist publisher and my sales were correspondingly small.

My ambitions were not. I wanted to be read. I wanted to make a living from my writing. I also knew the reading habits of crime fans, because I was one. You find a new author you like? You go straight out and buy everything they’ve written. I knew if I created a detective that spoke to a wider audience, they’d buy my earlier books.

But it wasn’t just the commercial imperative that drove me. I wanted straight people to love a gay character, understanding they had more in common than separated them. It was, in a small way, a political act.

Writers have always cared about the societies and systems they live with. My French friends are almost as interested in current British politics as in what is happening in France. Will the Scots hold the key to the next government? Will we really consider leaving the EU? Will there be another independence referendum? Who speaks for the left in the UK?

In the referendum last year, the creative community north and south of the border were front and centre in the debate. I don’t remember a time in British politics when novelists and comedians and playwrights and poets and musicians and artists took such an active role in campaigning.

Over the weekend, I found myself wondering why. I thought of the perceived disconnect between the electorate and the politicians. I thought of our disgust at the expenses scandal and a government so arrogant they can’t be bothered telling us how they’re going to strip the state to the bone if they win another term in office.

When people lose trust in politicians, they need to find it elsewhere. Maybe, because they trust writers to tell some kind of truth buried in the fictions, we’re being listened to in a way we rarely have before. And that’s a scary thought.