daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Jun 22nd, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defun wrap-or-unwrap-region (start end &optional arg)
  2.   "Without prefix arg: unfill region.
  3. With prefix arg: fill region."
  4.   (interactive "rP")
  5.   (save-excursion
  6.     (if arg
  7.         (fill-region start end)
  8.       (let ((temp-fill-column fill-column))
  9.         (setq fill-column 10000)        ; TODO: find a better value
  10.         (fill-region start end)
  11.         (setq fill-column temp-fill-column)))))
  12.  
  13. (defun wrap-or-unwrap-buffer (&optional arg)
  14.   "Without prefix arg: unfill buffer.
  15. With prefix arg: fill buffer."
  16.   (interactive "P")
  17.   (wrap-or-unwrap-region (point-min) (point-max) arg))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top