Unfilling a paragraph joins all the lines in a paragraph into a single line. It is the contrary of FillParagraph.
It works where a line ends with a newline character (”\n”) and paragraphs are separated by blank lines. To make a paragraph end in a single newline then use the function below:
;;; Stefan Monnier <foo at acm.org>. It is the opposite of fill-paragraph (defun unfill-paragraph () "Takes a multi-line paragraph and makes it into a single line of text." (interactive) (let ((fill-column (point-max))) (fill-paragraph nil)))
;; Handy key definition (define-key global-map "\M-Q" 'unfill-paragraph)
There is a whole bunch of unfilling functions in ourcomments-util.el in nXhtml. There is for example already a function unfill-region.