# Changelog

## master (unreleased)

## 5.23.0 (2026-03-25)

### New features

* Adopt the modern indent spec tuple format (`((:block N))`, `((:inner D))`, `((:inner D I))`) shared with `clojure-ts-mode` and `cljfmt`. The legacy format (integers, `:defn`, positional lists) is still accepted but will be removed in clojure-mode 6.
* Add `clojure-get-indent-spec` public API for retrieving indent specs in the modern format.
* `put-clojure-indent` and `define-clojure-indent` now accept both modern and legacy indent specs.

### Changes

* Convert all built-in `define-clojure-indent` specs to the modern tuple format.
* Improve documentation for the backtracking indentation mechanism in the README and docstrings.
* Drop the `s.el` test dependency (replaced `s-index-of` with `cl-position`).
* Migrate CI from CircleCI to GitHub Actions.
* Test on Emacs 30.1 for macOS and Windows (previously 29.4).

### Bugs fixed

* Fix `clojure-paredit-setup` to apply to `edn-mode-map` as well as `clojure-mode-map`.
* Fix destructive `sort` bug in `clojure-project-root-path`.

## 5.22.0 (2026-03-03)

### New features

* [#687](https://github.com/clojure-emacs/clojure-mode/issues/687): Add `clojure-preferred-build-tool` to control project root detection when multiple build tool files exist. When unset, prefer directories containing `.git` as a tiebreaker.
* [#688](https://github.com/clojure-emacs/clojure-mode/issues/688): Add `clojure-discard-face` for `#_` reader discard forms, allowing them to be styled differently from comments. Inherits from `font-lock-comment-face` by default.
* Add project root detection for ClojureCLR (`deps-clr.edn`).
* Give `edn-mode` its own keymap with data-appropriate bindings, excluding code-oriented refactoring commands.

### Changes

* Update font-locking of built-in dynamic vars for Clojure 1.12.
* Update `clojure-mode-extra-font-locking` for Clojure 1.10-1.12 (new functions in `clojure.core` and other bundled namespaces).
* Add `clojure.repl` section to `clojure-mode-extra-font-locking`.
* Remove non-existent entries from `clojure-mode-extra-font-locking` (`specify`, `specify!`, `special-form-anchor`, `syntax-symbol-anchor`, `stream?`).
* Extend `clojure--check-wrong-major-mode` to cover all derived modes (`.cljd`, `.jank`, `.joke`, `.edn`).
* Remove dead `.cljd` entry from `clojure-mode` `auto-mode-alist`.

### Bugs fixed

* [#402](https://github.com/clojure-emacs/clojure-mode/issues/402): Font-lock protocol method docstrings with `font-lock-doc-face`.
* [#649](https://github.com/clojure-emacs/clojure-mode/issues/649): Fix `clojure-add-arity` severing arglist metadata (`^String`, `^:keyword`, `^{...}`) when converting single-arity to multi-arity.
* [#600](https://github.com/clojure-emacs/clojure-mode/issues/600): Fix `clojure--valid-put-clojure-indent-call-p` rejecting valid indent specs with nested lists (e.g. `letfn`'s `(1 ((:defn)) nil)`).
* [#365](https://github.com/clojure-emacs/clojure-mode/issues/365): Font-lock function names in `letfn` bindings with `font-lock-function-name-face`.
* [#527](https://github.com/clojure-emacs/clojure-mode/issues/527): Fix `clojure-sort-ns` mangling `:gen-class` and other non-sortable ns forms.
* [#619](https://github.com/clojure-emacs/clojure-mode/issues/619): Fix `clojure-thread-last-all` breaking forms containing line comments by absorbing closing parens into comments.
* [#610](https://github.com/clojure-emacs/clojure-mode/issues/610): Fix `edn-mode` indentation to treat all paren lists as data rather than function calls.
* Fix `clojure-update-ns` broken by the removal of `clojure-namespace-name-regex`.
* Fix typos in `clojure-mode-extra-font-locking`: `halt-when?` -> `halt-when`, `simple-indent?` -> `simple-ident?`.
* Fix `doc` and `find-doc` misplaced under `clojure.core` instead of `clojure.repl` in extra font-locking.

## 5.21.0 (2026-02-18)

### New features

* [#650](https://github.com/clojure-emacs/clojure-mode/issues/650): Add `edn-mode`, a lightweight mode derived from `clojure-mode` with data-appropriate indentation for `.edn` files.
...
...
