diff options
author | Basil L. Contovounesios <contovob@tcd.ie> | 2019-03-27 15:13:25 +0000 |
---|---|---|
committer | Basil L. Contovounesios <contovob@tcd.ie> | 2019-03-31 17:08:21 +0100 |
commit | 0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6 (patch) | |
tree | a50516ab3cc6eebcfc683a037a88d31a805c8a7f /doc | |
parent | 99be0aba4defb8377cb148f7805ea07babc6182f (diff) | |
download | emacs-0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6.tar.gz |
Fix recently extended delete-indentation behavior
* doc/lispref/text.texi (User-Level Deletion): Document new optional
arguments of delete-indentation.
* lisp/simple.el (delete-indentation): Do not barf if called
interactively when region is inactive. (bug#35021)
Do not skip blank lines. (bug#35036)
Consistently deactivate mark even when no text was changed.
Handle active region spanning a single line.
* test/lisp/simple-tests.el (simple-test--buffer-substrings):
New convenience function.
(simple-test--dummy-buffer, simple-test--transpositions): Use it.
(simple-delete-indentation-no-region)
(simple-delete-indentation-inactive-region): Update commentary.
Call delete-indentation interactively when testing for behavior with
inactive region and region is not explicitly defined.
(simple-delete-indentation-blank-line)
(simple-delete-indentation-boundaries)
(simple-delete-indentation-region)
(simple-delete-indentation-prefix): New tests.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/lispref/text.texi | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 21c5a73f887..b430adf5976 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -723,12 +723,18 @@ You thought @end example @end deffn -@deffn Command delete-indentation &optional join-following-p +@deffn Command delete-indentation &optional join-following-p beg end This function joins the line point is on to the previous line, deleting any whitespace at the join and in some cases replacing it with one space. If @var{join-following-p} is non-@code{nil}, @code{delete-indentation} joins this line to the following line -instead. The function returns @code{nil}. +instead. Otherwise, if @var{beg} and @var{end} are non-@code{nil}, +this function joins all lines in the region they define. + +In an interactive call, @var{join-following-p} is the prefix argument, +and @var{beg} and @var{end} are, respectively, the start and end of +the region if it is active, else @code{nil}. The function returns +@code{nil}. If there is a fill prefix, and the second of the lines being joined starts with the prefix, then @code{delete-indentation} deletes the |