Skip to content

Fix remaining bugs in paredit-kill #1914

@dandavison

Description

@dandavison

#1425 added an implementation of paredit-kill, but left some bugs unfixed. The following bugs are mentioned in the PR.

Some of the screenshots below have color displaying the region that will be killed, for debugging purposes. This commit adds that (for debugging only): dandavison@c2776fb

1

(JS)
Here is an example of something that does not work correctly yet:

  const initialText = `(
  (
    a b
  )
  (
    c d
  )
)`;

With cursor here: const initialText = <CURSOR>`(, the result is

  const initialText = `;

So as you can see it incorrectly leaves a backtick. In Emacs, in contrast, it deletes both backticks and the material contained within them:

  const initialText = ;

2

(Scala)
Here's an incorrect case (it should kill to end of line in this situation, but the shading shows that it actually kills to the end of the next line)

image

"source": source_name,
{"id": f'{target_name}.{space}' if space else target_name},
op

3

(Scala)
And another one, in Scala. Again, this should kill to end of current line only:

image

      val userIdInQueryParams = 
      if (satisfiesCustomAccessControlLogic(ctx.key.opaqueName1)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions