The simplest thing is to set the fill-column to 9999 or something like that, and then use M-q to fill the paragraph, and M-n to move to the next paragraph.
C-u 9999 C-x f M-q M-n M-q M-n M-q M-n M-q M-n . . .
Or, using keyboard macros:
C-u 9999 C-x f C-x ( M-n M-q C-x ) C-u 99 C-x e
Or, in an elisp function:
(defun unfill-buffer () "Undo filling for all paragraphs." (interactive) (goto-char (point-min)) (let ((fill-column 99999)) (fill-paragraph nil) (while (< (point) (point-max)) (forward-paragraph) (fill-paragraph nil))))