diff options
| author | Basil L. Contovounesios | 2019-03-27 15:13:25 +0000 |
|---|---|---|
| committer | Basil L. Contovounesios | 2019-03-31 17:08:21 +0100 |
| commit | 0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6 (patch) | |
| tree | a50516ab3cc6eebcfc683a037a88d31a805c8a7f /doc/lispref | |
| parent | 99be0aba4defb8377cb148f7805ea07babc6182f (diff) | |
| download | emacs-0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6.tar.gz emacs-0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6.zip | |
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/lispref')
| -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 | |||
| 723 | @end example | 723 | @end example |
| 724 | @end deffn | 724 | @end deffn |
| 725 | 725 | ||
| 726 | @deffn Command delete-indentation &optional join-following-p | 726 | @deffn Command delete-indentation &optional join-following-p beg end |
| 727 | This function joins the line point is on to the previous line, deleting | 727 | This function joins the line point is on to the previous line, deleting |
| 728 | any whitespace at the join and in some cases replacing it with one | 728 | any whitespace at the join and in some cases replacing it with one |
| 729 | space. If @var{join-following-p} is non-@code{nil}, | 729 | space. If @var{join-following-p} is non-@code{nil}, |
| 730 | @code{delete-indentation} joins this line to the following line | 730 | @code{delete-indentation} joins this line to the following line |
| 731 | instead. The function returns @code{nil}. | 731 | instead. Otherwise, if @var{beg} and @var{end} are non-@code{nil}, |
| 732 | this function joins all lines in the region they define. | ||
| 733 | |||
| 734 | In an interactive call, @var{join-following-p} is the prefix argument, | ||
| 735 | and @var{beg} and @var{end} are, respectively, the start and end of | ||
| 736 | the region if it is active, else @code{nil}. The function returns | ||
| 737 | @code{nil}. | ||
| 732 | 738 | ||
| 733 | If there is a fill prefix, and the second of the lines being joined | 739 | If there is a fill prefix, and the second of the lines being joined |
| 734 | starts with the prefix, then @code{delete-indentation} deletes the | 740 | starts with the prefix, then @code{delete-indentation} deletes the |