Guest User

Untitled

a guest
May 24th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. (defun sort-uniq-buffer ()
  2. "Sort and uniq current buffer"
  3. (interactive)
  4. (let (start end)
  5. (if (region-active-p)
  6. (progn (setq start (region-beginning))
  7. (setq end (region-end)))
  8. (setq start (point-min))
  9. (setq end (point-max)))
  10. (sort-lines nil start end)
  11. (delete-duplicate-lines start end)))
Add Comment
Please, Sign In to add comment