# Changelog

## master (unreleased)

### 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`).

### 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?`).

### Bugs fixed

* [#402](https://github.com/clojure-emacs/clojure-mode/issues/402): Font-lock protocol method docstrings with `font-lock-doc-face`.
* 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.
* [#439](https://github.com/clojure-emacs/clojure-mode/issues/439): Add `interpreter-mode-alist` entries for `clojure`, `clj`, `planck`, `joker`, and `jank`, so that scripts with shebang lines are recognized automatically.

### Bugs fixed

* [#658](https://github.com/clojure-emacs/clojure-mode/issues/658): Fix `clojure-mode-version` returning `nil`.
* [#686](https://github.com/clojure-emacs/clojure-mode/issues/686): Fix `clojure-find-def` failing when comments appear between the `def` form and the symbol name.
* [#637](https://github.com/clojure-emacs/clojure-mode/issues/637): Fix `clojure-find-def` failing on symbols containing special characters (e.g. `defn+`).

### Changes

* [#482](https://github.com/clojure-emacs/clojure-mode/issues/482): Bind `clojure-align` to `C-c C-a` (following Emacs keybinding conventions). The old `C-c SPC` binding is deprecated and will be removed in a future release.
* Bump the minimum required Emacs version to 27.1.

## 5.20.0 (2025-05-27)

### New features

* Add `clojuredart-mode`, `joker-mode` and `jank-mode`, derived from `clojure-mode`.

### Bugs fixed

* [cider#3758](https://github.com/clojure-emacs/cider/issues/3758): Improve regexp for `clojure-find-def` to recognize more complex metadata on vars.
* [#684](https://github.com/clojure-emacs/clojure-mode/issues/684): Restore `outline-regexp` pattern to permit outline handling of top-level forms.
* Improve regexp for `clojure-find-def` to recognize `defn-` and other declarations on the form `def...-`.

## 5.19.0 (2024-05-26)

### Bugs fixed

* Fix `clojure-align` when called from `clojure-ts-mode` major mode buffers.
* [#671](https://github.com/clojure-emacs/clojure-mode/issues/671): Syntax highlighting for digits after the first in `%` args. (e.g. `%10`)
* [#680](https://github.com/clojure-emacs/clojure-mode/issues/680): Change syntax class of ASCII control characters to punctuation, fixing situations where carriage returns were being interpreted as symbols.

### Changes

* [#675](https://github.com/clojure-emacs/clojure-mode/issues/675): Add `.lpy` to the list of known Clojure file extensions.

## 5.18.1 (2023-11-24)

### Bugs fixed

* [#653](https://github.com/clojure-emacs/clojure-mode/issues/653): Don't highlight vars with colons as keywords.

## 5.18.0 (2023-10-18)

### Changes

* [cider#2903](https://github.com/clojure-emacs/cider/issues/2903): Avoid `No comment syntax is defined` prompts.
...
...
