Skip to content

Instantly share code, notes, and snippets.

@jletourneau
Last active November 19, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jletourneau/6291ede3d85ad1e84347 to your computer and use it in GitHub Desktop.
Save jletourneau/6291ede3d85ad1e84347 to your computer and use it in GitHub Desktop.
Unfilling paragraphs in Elisp
(defun unfill-region (start end)
"Unfill the current region; i.e. remove all newlines within paragraphs.
If an active region is not present, unfill the entire buffer."
(interactive "r")
(let ((fill-column (point-max)))
(if (use-region-p)
(fill-region start end)
(fill-region (point-min) (point-max)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment