[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49120: [PATCH] Add commands 'kill-lines' and 'copy-lines'
From: |
Eli Zaretskii |
Subject: |
bug#49120: [PATCH] Add commands 'kill-lines' and 'copy-lines' |
Date: |
Sat, 03 Jul 2021 10:07:00 +0300 |
> Date: Thu, 01 Jul 2021 23:50:26 +0000
> From: Okam <okamsn@protonmail.com>
> Cc: 49120@debbugs.gnu.org
>
> >> +(defun kill-lines (regexp &optional rstart rend interactive)
> >> + "Kill lines containing matches for REGEXP.
> >> +
> >> +When called from Lisp (and usually when called interactively as
> >> +well, see below), applies to the part of the buffer after point.
> >> +The line point is in is killed if and only if it contains a match
> >> +for regexp starting after point.
> > ^^^^^^
> > REGEXP should in all caps.
> >
> >> +Second and third arg RSTART and REND specify the region to
> > ^^^
> > "args", in plural.
> >
> >> +operate on. Lines partially contained in this region are killed
> >> +if and only if they contain a match entirely contained in it.
> > ^^^^^
> > "in the region" will make this more clear.
> >
> >> + When
> >> +calling this function from Lisp, you can pretend that it was
> >> +called interactively by passing a non-nil INTERACTIVE argument.
> >
> > This is not specific to this command, so why tell it here?
> >
> > Same comments apply to copy-lines.
>
>
> Fixed. Since the documentation string was originally copied from
> `flush-lines`, do you want `keep-lines` and `flush-lines` to also have
> these changes?
Yes. But that should be a separate patch.
The patch LGTM, thanks.