[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r116160: Some doc for delete-duplicate-lines
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] trunk r116160: Some doc for delete-duplicate-lines |
Date: |
Sun, 26 Jan 2014 01:10:27 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 116160
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-01-25 17:10:18 -0800
message:
Some doc for delete-duplicate-lines
* doc/emacs/killing.texi (Deletion): Mention delete-duplicate-lines.
* lisp/sort.el (delete-duplicate-lines): Doc fix.
* etc/NEWS: Related edit.
modified:
doc/emacs/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6227
doc/emacs/killing.texi
killing.texi-20091113204419-o5vbwnq5f7feedwu-6258
etc/NEWS news-20100311060928-aoit31wvzf25yr1z-1
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/sort.el sort.el-20091113204419-o5vbwnq5f7feedwu-125
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog 2014-01-24 07:36:34 +0000
+++ b/doc/emacs/ChangeLog 2014-01-26 01:10:18 +0000
@@ -1,3 +1,7 @@
+2014-01-26 Glenn Morris <address@hidden>
+
+ * killing.texi (Deletion): Mention delete-duplicate-lines.
+
2014-01-24 Glenn Morris <address@hidden>
* ack.texi (Acknowledgments): No longer mention obsolete xesam.el,
=== modified file 'doc/emacs/killing.texi'
--- a/doc/emacs/killing.texi 2014-01-01 07:43:34 +0000
+++ b/doc/emacs/killing.texi 2014-01-26 01:10:18 +0000
@@ -136,6 +136,17 @@
previous line, by deleting a newline and all surrounding spaces, usually
leaving a single space. @xref{Indentation,M-^}.
address@hidden Not really sure where to put this...
address@hidden delete-duplicate-lines
+ The command @code{delete-duplicate-lines} searches the region for
+identical lines, and removes all but one copy of each. Normally it
+keeps the first instance of each repeated line, but with a @kbd{C-u}
+prefix argument it keeps the last. With a @kbd{C-u C-u} prefix
+argument, it only searches for adjacent identical lines. This is a
+more efficient mode of operation, useful when the lines have already
+been sorted. With a @kbd{C-u C-u C-u} prefix argument, it retains
+repeated blank lines.
+
@node Killing by Lines
@subsection Killing by Lines
=== modified file 'etc/NEWS'
--- a/etc/NEWS 2014-01-25 03:00:52 +0000
+++ b/etc/NEWS 2014-01-26 01:10:18 +0000
@@ -312,12 +312,10 @@
*** New command `C-x r f' (`frameset-to-register').
See Changes in Emacs 24.4, above.
++++
** New command `delete-duplicate-lines'.
-When its arg ADJACENT is non-nil (when called interactively with C-u
-C-u) it works like the utility `uniq'. Otherwise by default it
-deletes duplicate lines everywhere in the region without regard to
-adjacency. When its arg KEEP-BLANKS is non-nil (when called
-interactively with C-u C-u C-u), duplicate blank lines are preserved.
+This searches the region for identical lines, and removes all but one
+copy of each repeated line. The lines need not be sorted.
* Changes in Specialized Modes and Packages in Emacs 24.4
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2014-01-26 00:47:40 +0000
+++ b/lisp/ChangeLog 2014-01-26 01:10:18 +0000
@@ -1,3 +1,7 @@
+2014-01-26 Glenn Morris <address@hidden>
+
+ * sort.el (delete-duplicate-lines): Doc fix.
+
2014-01-25 RĂ¼diger Sonderfeld <address@hidden>
* progmodes/ada-mode.el (ada):
=== modified file 'lisp/sort.el'
--- a/lisp/sort.el 2014-01-01 07:43:34 +0000
+++ b/lisp/sort.el 2014-01-26 01:10:18 +0000
@@ -570,25 +570,23 @@
;;;###autoload
(defun delete-duplicate-lines (beg end &optional reverse adjacent keep-blanks
interactive)
- "Delete duplicate lines in the region between BEG and END.
-
-If REVERSE is nil, search and delete duplicates forward keeping the first
-occurrence of duplicate lines. If REVERSE is non-nil (when called
-interactively with C-u prefix), search and delete duplicates backward
-keeping the last occurrence of duplicate lines.
-
-If ADJACENT is non-nil (when called interactively with two C-u prefixes),
-delete repeated lines only if they are adjacent. It works like the utility
-`uniq' and is useful when lines are already sorted in a large file since
-this is more efficient in performance and memory usage than when ADJACENT
-is nil that uses additional memory to remember previous lines.
-
-If KEEP-BLANKS is non-nil (when called interactively with three C-u prefixes),
-duplicate blank lines are preserved.
-
-When called from Lisp and INTERACTIVE is omitted or nil, return the number
-of deleted duplicate lines, do not print it; if INTERACTIVE is t, the
-function behaves in all respects as if it had been called interactively."
+ "Delete all but one copy of any identical lines in the region.
+Non-interactively, arguments BEG and END delimit the region.
+Normally it searches forwards, keeping the first instance of
+each identical line. If REVERSE is non-nil (interactively, with
+a C-u prefix), it searches backwards and keeps the last instance of
+each repeated line.
+
+Identical lines need not be adjacent, unless the argument
+ADJACENT is non-nil (interactively, with a C-u C-u prefix).
+This is a more efficient mode of operation, and may be useful
+on large regions that have already been sorted.
+
+If the argument KEEP-BLANKS is non-nil (interactively, with a
+C-u C-u C-u prefix), it retains repeated blank lines.
+
+Returns the number of deleted lines. Interactively, or if INTERACTIVE
+is non-nil, it also prints a message describing the number of deletions."
(interactive
(progn
(barf-if-buffer-read-only)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r116160: Some doc for delete-duplicate-lines,
Glenn Morris <=