clojure-mode 
- Description
- Major mode for Clojure code
- Latest
- clojure-mode-5.24.0.tar (.sig), 2026-Nov-08, 270 KiB
- Maintainer
- Bozhidar Batsov <bozhidar@batsov.dev>
- Other versions:
- development version
- Website
- https://github.com/clojure-emacs/clojure-mode
- ELPA's Repository
- CGit or Gitweb
To install this package from Emacs, use package-install or list-packages.
Full description
Provides font-lock, indentation, navigation and basic refactoring for the Clojure programming language (https://clojure.org). Using clojure-mode with paredit or smartparens is highly recommended. Here are some example configurations: ;; require or autoload paredit-mode (add-hook 'clojure-mode-hook #'paredit-mode) ;; require or autoload smartparens (add-hook 'clojure-mode-hook #'smartparens-strict-mode) See inf-clojure (https://github.com/clojure-emacs/inf-clojure) for basic interaction with Clojure subprocesses. See CIDER (https://github.com/clojure-emacs/cider) for better interaction with subprocesses via nREPL.
Old versions
| clojure-mode-5.23.0.tar.lz | 2026-Mar-25 | 49.1 KiB |
| clojure-mode-5.22.0.tar.lz | 2026-Mar-04 | 46.1 KiB |
| clojure-mode-5.21.0.tar.lz | 2026-Feb-18 | 43.4 KiB |
| clojure-mode-5.20.0.tar.lz | 2025-May-27 | 42.1 KiB |
| clojure-mode-5.19.0.tar.lz | 2024-May-26 | 42.0 KiB |
| clojure-mode-5.18.1.tar.lz | 2024-Mar-31 | 41.4 KiB |
| clojure-mode-5.18.0.tar.lz | 2023-Oct-18 | 41.0 KiB |
| clojure-mode-5.17.1.tar.lz | 2023-Oct-12 | 41.0 KiB |
| clojure-mode-5.17.0.tar.lz | 2023-Sep-11 | 40.9 KiB |
| clojure-mode-5.16.2.tar.lz | 2023-Aug-23 | 40.6 KiB |
| clojure-mode-5.16.1.tar.lz | 2023-Jun-26 | 40.4 KiB |
| clojure-mode-5.16.0.tar.lz | 2022-Dec-14 | 40.2 KiB |
| clojure-mode-5.15.1.tar.lz | 2022-Jul-30 | 39.5 KiB |
| clojure-mode-5.15.0.tar.lz | 2022-Jul-19 | 39.4 KiB |
| clojure-mode-5.14.0.tar.lz | 2022-Mar-08 | 39.2 KiB |
| clojure-mode-5.13.0.tar.lz | 2021-Aug-09 | 37.4 KiB |
News
Changelog
master (unreleased)
5.24.0 (2026-11-07)
New features
- #708: Add
clojure-remove-unused-keys(C-c C-r k), which removes the names the top-level form at point destructures from maps but never uses, along with their:ordefaults.
Changes
- #705: Rename the
#_toggle commands toclojure-toggle-discard,clojure-toggle-discard-surrounding-formandclojure-toggle-discard-defun, matching Clojure's "discard" terminology (the oldclojure-toggle-ignore*names remain as obsolete aliases). - #709: Give
extend-protocol,extend-type,specifyandspecify!the((:block 1) (:inner 1))indent spec thatclojure-ts-modeand cljfmt use, instead of an(:inner 0)rule that only worked because of how it was converted to the legacy format (specs copied from it need(:inner 1)too). - #709: Indent
fdeflike cljfmt does, as((:inner 0)), and listlet*in the built-in indent specs, so thatclojure-get-indent-specreturns its spec. - #709: Add the indent specs that cljfmt and
clojure-ts-modehave andclojure-modelacked, which indents the bodies ofmatchandstruct-map, and the bindings ofwith-open,with-redefsand the like as special arguments. - #710: Drop the indent specs of
async,this-asand core.logic'srun,run*andfresh, which cljfmt andclojure-ts-modedon't have, so they're indented like function calls now (put-clojure-indentbrings them back).
Bugs fixed
- #709: Fix
clojure-get-indent-specandput-clojure-indentconverting legacy indent specs, like those ofletfn,reifyorextend-protocol, to the wrong modern rules. - #709: Fix indenting with a modern indent spec that has an
:innerrule with a position but no:blockrule, like((:inner 1 0)), which signaled an error. - #711: Fix the indentation of
letfnfunctions, and of other forms an:innerrule with an index applies to, when a#_form comes before them, as the discarded form and its#_counted as two arguments. - #707: Highlight
[[var]]and`code`only in strings and comments, so Datalog relation bindings like[[?x]]and destructuring like(fn [[x]] x)aren't colored as constants in code.
5.23.0 (2026-03-25)
New features
- Adopt the modern indent spec tuple format (
((:block N)),((:inner D)),((:inner D I))) shared withclojure-ts-modeandcljfmt. The legacy format (integers,:defn, positional lists) is still accepted but will be removed in clojure-mode 6.- Add
clojure-get-indent-specpublic API for retrieving indent specs in the modern format. put-clojure-indentanddefine-clojure-indentnow accept both modern and legacy indent specs.
- Add
Changes
- Convert all built-in
define-clojure-indentspecs to the modern tuple format. - Migrate CI from CircleCI to GitHub Actions.
Bugs fixed
- Fix
clojure-paredit-setupto apply toedn-mode-mapas well asclojure-mode-map. - Fix destructive
sortbug inclojure-project-root-path.
5.22.0 (2026-03-03)
New features
- #687: Add
clojure-preferred-build-toolto control project root detection when multiple build tool files exist. When unset, prefer directories containing.gitas a tiebreaker. ... ...