Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun wrap-or-unwrap-region (start end &optional arg)
- "Without prefix arg: unfill region.
- With prefix arg: fill region."
- (interactive "rP")
- (save-excursion
- (if arg
- (fill-region start end)
- (let ((temp-fill-column fill-column))
- (setq fill-column 10000) ; TODO: find a better value
- (fill-region start end)
- (setq fill-column temp-fill-column)))))
- (defun wrap-or-unwrap-buffer (&optional arg)
- "Without prefix arg: unfill buffer.
- With prefix arg: fill buffer."
- (interactive "P")
- (wrap-or-unwrap-region (point-min) (point-max) arg))
Add Comment
Please, Sign In to add comment