Pistols can have folding stocks, too - IRL. WW1-era Luger pistols could have a wooden stock attached; Artillery officers were issued Lugers with those stocks, longer barrels, and 32-round drum magazines. (The intention seems to have been for the officers to use the pistol an especially light Carbine sort of affair.)
And a machine pistol can, IRL, still have a foregrip.