Did, for example, the French-speaking Swiss try to join revolutionary France? During German unification, were there attempts to include the German-speaking parts of Switzerland? How about the Italians?
Did the great powers (France, Austria, later Germany) try to enlist local nationalists to gain more influence?
It's interesting how multi-ethnic Switzerland survived the wave of nationalisms that swept throughout Europe. Was it because of comparatively greater civil liberties that peoples of Switzerland weren't eager to rebel against the state? Or they did but were crushed?
Good question, and I hope someone who knows more about this subject will contribute. For now, I will just point out that you are really asking about ethnic nationalism, where nations are understood to represent ethnic and linguistic unities. The Swiss of course are not a single nation if you understand this to mean sharing a common language. But they do have a strong sense of national identity based on a shared sense of history and customs.
The Swiss canton borders don't follow linguistic divisions, and there has been almost no history of different linguistic communities trying to separate from the others, seeking autonomy or independence or joining a neighbouring nation-state. An exception was during the Napoleonic period, when there was an attempted coup by some Italian-speaking Ticinese to join Ticino to the new Napoleonic Cisalpine Republic of northern Italy. This attempt was repelled by hostile crowds in Lugano, who proclaimed themselves "Liberi e Svizzeri (Free and Swiss)".
Maybe the best-known literary composition about Switzerland in the 19th century was William Tell by German playwright Friedrich Schiller, in which the Swiss struggles against a (German-speaking) Habsburg tyrant is celebrated. So the prevailing self-image for the Swiss in this age of nationalism was that of resisting outsiders, even if they spoke the same language.