PARIS — The French president responded Wednesday evening to President Trump’s scathing personal attack on him, declining to lash out and instead taking the long view.

In a television interview on the aircraft carrier Charles de Gaulle, which President Emmanuel Macron was visiting, he made clear that he was not going to respond in kind, but hew to both countries’ longstanding common interests.

“I do not do policy or diplomacy by tweets,” he said.

“At each important moment in our history we have been allies, and between allies there is respect and I do not want to hear the rest,” he said after detailing French-American mutual support since 1776, when the Marquis de Lafayette fought with the struggling 13 colonies in the Revolutionary War — an alliance that has lasted through today’s war on terrorism.

Mr. Trump’s tweets were aimed at his domestic constituency, Mr. Macron said. He is “doing American politics,” Mr. Macron said.