;; I recommend (global-set-key (kbd "S-SPC") 'ph/delete-whitespace)
(defvar ph/delete-whitespace-counter 0)
(defvar ph/delete-whitespace-counter 0)
(defun ph/delete-whitespace (arg)
(interactive "*p")
(if (eq this-command last-command)
(progn
(incf ph/delete-whitespace-counter)
(if (= ph/delete-whitespace-counter 1)
(delete-blank-lines)
(join-line arg)))
(setq ph/delete-whitespace-counter 0)
(just-one-space arg)))
What other idempotent commands which deserve their own combination like this?