clojure-emacs / clojure-emacs/clojure-ts-mode

paredit-kill freezes when killing the last form in the buffer

Open
#81 6 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Emacs Lisp
Stars
188
Forks
21
Avg merge
12m
Merged PRs (30d)
1

Description

## Expected behavior

When standing at the beginning of a form that is the last one in the buffer and pressing `C-k` (which is bound to `paredit-kill` when Paredit is enabled), the form should be killed like any other form.

## Actual behavior

Emacs freezes and spins CPU at 100%. Pressing `C-g` gets it out of this, but the form still remains.

## Steps to reproduce the problem

Go to any Clojure file, enable Paredit, perform `paredit-kill` on the last form, e.g.:

Image

## Environment & Version information

- MacOS Sequioia 15.3.2
- Emacs 30.1.50 (built from https://github.com/jdtsmith/emacs-mac)
- Latest clojure-ts-mode from unstable MELPA

### clojure-ts-mode version

clojure-ts-mode 0.4.0-snapshot (package: 20250415.804)

### tree-sitter-clojure grammar version

Not sure.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.