delete-horizontal-space) is used for removing all spaces between non-spaces.
But this key binding is hard to press.
There is similar key binding
just-one-space) - remove all spaces and add
In 2013-01-30 Michal Nazarewicz introduce new function
cycle-spacing that combine both
delete-horizontal-space by cycling between one space, no space
at all and original spacing.
So now I have in
(when (fboundp 'cycle-spacing) (global-set-key (kbd "M-SPC") 'cycle-spacing))