Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defun sort-uniq-buffer ()
- "Sort and uniq current buffer"
- (interactive)
- (let (start end)
- (if (region-active-p)
- (progn (setq start (region-beginning))
- (setq end (region-end)))
- (setq start (point-min))
- (setq end (point-max)))
- (sort-lines nil start end)
- (delete-duplicate-lines start end)))
Add Comment
Please, Sign In to add comment