[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [wish] copy-pasting indented code when auto-indent is on
From: |
Benno Schulenberg |
Subject: |
Re: [wish] copy-pasting indented code when auto-indent is on |
Date: |
Fri, 3 Jan 2020 15:29:58 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
Op 02-01-2020 om 12:30 schreef Brand Huntsman:
> https://savannah.gnu.org/bugs/?40060 contains a patch to detect pasting.
Nice.
Inspecting the patch, I don't see why you need the do_nothing() function
and the BRACKETED_PASTE_MARKER symbol. The escape-sequence parsing does
not need to return any value -- by default it returns ERR, which means
that the sequence gets ignored, which is what we want in this case (at
least, for the basic feature of toggling the 'bracketed_paste' boolean
on and off).
Also, bracketed-paste mode needs to be disabled in so many places that it
deserves a separate small function, disable_bracketed_paste(), which then
doesn't need any comment when it's called.
Do you wish to submit a streamlined patch? Or shall I do the trimming?
Benno
signature.asc
Description: OpenPGP digital signature