aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorBasil L. Contovounesios2019-03-27 15:13:25 +0000
committerBasil L. Contovounesios2019-03-31 17:08:21 +0100
commit0cd250e9583deb1e1f4d8dae2ec44c4f7c13efa6 (patch)
treea50516ab3cc6eebcfc683a037a88d31a805c8a7f /doc/lispref
parent99be0aba4defb8377cb148f7805ea07babc6182f (diff)
downloademacs-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.texi10
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
727This function joins the line point is on to the previous line, deleting 727This function joins the line point is on to the previous line, deleting
728any whitespace at the join and in some cases replacing it with one 728any whitespace at the join and in some cases replacing it with one
729space. If @var{join-following-p} is non-@code{nil}, 729space. 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
731instead. The function returns @code{nil}. 731instead. Otherwise, if @var{beg} and @var{end} are non-@code{nil},
732this function joins all lines in the region they define.
733
734In an interactive call, @var{join-following-p} is the prefix argument,
735and @var{beg} and @var{end} are, respectively, the start and end of
736the region if it is active, else @code{nil}. The function returns
737@code{nil}.
732 738
733If there is a fill prefix, and the second of the lines being joined 739If there is a fill prefix, and the second of the lines being joined
734starts with the prefix, then @code{delete-indentation} deletes the 740starts with the prefix, then @code{delete-indentation} deletes the