''Our relations are so good,'' says the Mexican wag commenting on Canadian-Mexican ties, ''that the next step is to establish a common border.''
That joke, making the rounds in Mexico City, is a good indicator of the tone of this week's talks between visiting Canadian Prime Minister Pierre Trudeau and his Mexican host, President Jose Lopez Portillo.
On both the political and economic fronts, these two nations and their leaders have established a warm and growing rapport.
They disagree on some issues - for example, Mr. Trudeau supports the Salvadoran junta's plans to hold nationwide legislative elections in March, while Mr. Lopez Portillo has major reservations.
But the warm feeling between the two pushes such disagreement into the background.
Mexican-Canadian trade doubled in 1981 and promises to continue to grow in 1982.
''Canada is providing for us a significant North American alternative to the United States,'' comments a Mexican Foreign Ministry spokesman.
''We want to strengthen this alternative and lessen the heavy dependence that our economy has on the United States.''
Mexico sees another advantage in the Canadian connection: It lessens whatever concern Washington might have that Mexico will strengthen ties outside the Western Hemisphere.
''It keeps it all within the North American family,'' is the way the Foreign Ministry spokesman.
President Lopez Portillo took the same tack in a recent broadcast for Radio Canada when he commented on ''the North American connection.''
In the past, however, the Mexicans were quick to reject a common North American oil policy as advanced by President Jimmy Carter.
And it is certain the Mexicans, along with the Canadians, will move slowly on any effort to set up a trilateral North American connection with the larger and more powerful neighbor between them -- the US.
What is likely to result from the Trudeau-Lopez Portillo sessions, which began Jan. 13 and will continue through Jan. 16, is a further cementing of the obviously good relations with two important new steps:
* An opportunity for Prime Minister Trudeau to meet informally with Miguel de la Madrid Hurtado, who has been named as Mr. Lopez Portillo's successor in this largely one-party democracy.
* The signing of preliminary papers for a $5 billion nuclear deal by which Canada would help give Mexico an independent nuclear fuel cycle by the end of this decade.
Very little on this issue has gotten into the public forums here. But there has been a lot of speculation in recent weeks.
And both Mexican and Canadian sources this week indicate privately that the deal is close to consummation and could be signed by the two leaders.
''The secrecy is important,'' says a source close to President Lopez Portillo. ''After all, we are talking about an issue that is at the heart of world security. But Mexico needs this self-sufficiency and Canada seems ready to supply it.''
Earlier Mexican nuclear arrangements with US firms -- General Electric and Westinghouse among others -- have gone sour. The General Electric project is not going according to plan, and Westinghouse has indicated it wants out of its arrangement with Mexico. And so a deal with Canada appears much more enticing to the Mexicans.
In return, of course, Canada hopes to get more Mexican oil, particularly for its eastern cities. Mexico says this is ''virtually certain.''
Canadian exports to Mexico rose from $286 million to $450 million during the first nine months of 1981, and Mexican exports to Canada grew from $187 million to $600 million during that period.
That tremendous jump over the same months of 1980 was largely due to exports of Mexican petroleum to Canada. In return, Canada is supplying newsprint, powdered milk, automotive parts, and railway equipment to Mexico. An increase in all these areas is expected in 1982.
''We regard Mexico, along with Brazil and Venezuela, as our best market in Latin America,'' says R. V. Gorham, a high official in the Canadian Foreign Ministry, in a widely quoted comment here in Mexico this week.
The Mexican Foreign Ministry, in return, comments: ''Canada is one of our best markets, and we expect it to become one of our top five within the decade.''
It is now No. 9.