A long gun chambered in an actual rifle caliber (5.45x39, 5.56x45, 7.62x39, 7.62x51, .30-06, etc.), would obviously be preferable to a pistol caliber long arm. However, there might be situations for some folks where a pistol caliber carbine might be the best choice (one situation that comes to mind is a shooter that is not physically capable of handling a larger caliber, whether because of age or some physical ailment)...in which case there are a few choices where you could have your long gun and your pistol using the same ammo and magazines.
The first that comes to mind is, as armyguy mentioned, the Kel-Tec Sub2000 carbine. In 9mm, it can be had in versions that accept Glock 17 mags, Glock 19 mags, Beretta 92 mags, S&W M.59 mags, and Sig P226 mags. In .40 S&W, it's available in versions that accept Glock 22 mags, Glock 23 mags, Beretta 96 mags, S&W M.4006 mags, and Sig P226 mags. Also, you can change the mag catch so you can use the Beretta mags, or S&W mags, or the Sig mags. The Glock version can't be changed. And in case you aren't aware of it, the SUB 2000 also folds in half, at the trigger guard, to a length of only 16"...though it can't be fired in this position, and it only weighs 4 pounds empty. So it's certainly a very light, handy weapon.
There is also at least one maker of an AR in 9mm that accepts Glock mags, and also the new Feather takes Glock mags and is available in .22LR/9mm/357 SIG/.40 S&W/45ACP/10mm, and there is some ability to swap calibers too.
Then you could always go the Calico or Uzi route. Both of these are available in carbines as well as "pistols", but in both cases, the pistols are quite large, more along the lines of what's often referred to (erroneously) as "assault pistols".
Marlin made a Camp Carbine in 9mm that used S&W M.59 mags, and in .45 that used 1911 mags. These are no longer manufactured, and are becoming difficult to find, and the prices are going up.
Iver Johnson made a 9mm M1 carbine that took Hi-Power magazines. These are even scarcer, apparently were not produced in large numbers.
Another option is the kits that are available that can convert the Glock pistols into carbines.
The idea of a lever action/revolver combo is also quite valid, and probably would extend the useful range of both carbine and pistol, since most of these would likely be chambered in .357 or .44 Magnum, though other, less-powerful cartridges are also available.
Hope this was of some help.
Tim