[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Un)comment line(s) with markers at arbitrary position(s) in this/th
From: |
Hongyi Zhao |
Subject: |
Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line. |
Date: |
Wed, 3 May 2023 08:00:11 +0800 |
On Wed, May 3, 2023 at 3:08 AM Tassilo Horn <tsdh@gnu.org> wrote:
>
> Hongyi Zhao <hongyi.zhao@gmail.com> writes:
>
> > I want to have the feature of (Un)comment a line or several lines with
> > markers at an arbitrary position(s) in/spanning this/these line(s).
>
> Use comment-line instead of comment-dwim.
>
> --8<---------------cut here---------------start------------->8---
> C-x C-; runs the command comment-line (found in global-map), which is an
> interactive byte-compiled Lisp function in ‘newcomment.el’.
>
> It is bound to C-x C-;.
>
> (comment-line N)
>
> Comment or uncomment current line and leave point after it.
> With positive prefix, apply to N lines including current one.
> With negative prefix, apply to -N lines above. Also, further
> consecutive invocations of this command will inherit the negative
> argument.
>
> If region is active, comment lines in active region instead.
> Unlike ‘comment-dwim’, this always comments whole lines.
> --8<---------------cut here---------------end--------------->8---
But when I try `C-x C-;`, the weird behavior is triggered, as shown in
the attached file.
> Bye,
> Tassilo
Regards,
Zhao
image.png
Description: PNG image
- (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Hongyi Zhao, 2023/05/01
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Tassilo Horn, 2023/05/02
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line.,
Hongyi Zhao <=
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Tassilo Horn, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Hongyi Zhao, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Tassilo Horn, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Hongyi Zhao, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Hongyi Zhao, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Tassilo Horn, 2023/05/03
- Re: (Un)comment line(s) with markers at arbitrary position(s) in this/these line., Hongyi Zhao, 2023/05/08
- The strange shortcut key binding `Ctrl + ;` in Gnome. (Was: (Un)comment line(s) with markers at arbitrary position(s) in this/these line.), Hongyi Zhao, 2023/05/09