bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command


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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]