[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: |
Dani Moncayo |
Subject: |
bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command |
Date: |
Sat, 1 Dec 2012 10:08:49 +0100 |
> (defun delete-duplicate-lines (rstart rend &optional reverse adjacent
> interactive)
> "Delete duplicate lines in the region between RSTART and REND.
> If REVERSE is nil, search and delete duplicates forward keeping the first
> occurrence of duplicate lines. If REVERSE is non-nil, search and delete
> duplicates backward keeping the last occurrence of duplicate lines.
> If ADJACENT is non-nil, delete repeated lines only if they are adjacent."
Looks pretty fine to me. Your version is more general and versatile.
Some comments:
* Why is needed the INTERACTIVE command? I mean, Cannot that info
(whether the function has been called interactively) be retrieved
using some Lips primitive?
* In case the INTERACTIVE command is indeed necessary, it should be
explained in the docstring, no?
* I think that the docstring should explain also the return value
(number of duplicate lines deleted).
Thank you Juri. I hope Stefan or Chong add this feature to Emacs.
--
Dani Moncayo
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command,
Dani Moncayo <=
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Dani Moncayo, 2012/12/01
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Juri Linkov, 2012/12/01
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Dani Moncayo, 2012/12/02
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Juri Linkov, 2012/12/03
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Juri Linkov, 2012/12/03
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Dani Moncayo, 2012/12/04
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Juri Linkov, 2012/12/04
- bug#13032: 24.3.50; Request: Provide a `delete-duplicate-lines' command, Dani Moncayo, 2012/12/05