|
From: | Stefan Monnier |
Subject: | bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command |
Date: | Tue, 04 Dec 2012 09:46:33 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> (let ((lines (helm-fast-remove-dups > (split-string (buffer-string) "\n" t) > :test 'equal))) > (delete-region (point-min) (point-max)) > (loop for l in lines do (insert (concat l "\n"))))))) The inconvenient with this version is that any overlays/markers will be lost, and the buffer will be marked as modified even if there were no duplicate lines. Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |