CHANGELOG.md (19744B)
1 # Changelog 2 3 ## master (unreleased) 4 5 ## 5.16.0 (2022-12-14) 6 7 ### Changes 8 9 * [#641](https://github.com/clojure-emacs/clojure-mode/issues/641): Recognize nbb projects (identified by the presence of `nbb.edn`). 10 * [#629](https://github.com/clojure-emacs/clojure-mode/pull/629): Set `add-log-current-defun-function` to new function `clojure-current-defun-name` (this is used by `which-function-mode` and `easy-kill`). 11 12 ### Bugs fixed 13 14 * [#581](https://github.com/clojure-emacs/clojure-mode/issues/581): Fix font locking not working for keywords starting with a number. 15 * [#377](https://github.com/clojure-emacs/clojure-mode/issues/377): Fix everything starting with the prefix `def` being highlighted as a definition form. Now definition forms are enumerated explicitly in the font-locking code, like all other forms. 16 * [#638](https://github.com/clojure-emacs/clojure-mode/pull/638): Fix imenu with Clojure code in string or comment. 17 18 ## 5.15.1 (2022-07-30) 19 20 ### Bugs fixed 21 22 * [#625](https://github.com/clojure-emacs/clojure-mode/issues/625): Fix metadata being displayed in `imenu` instead of var name. 23 24 ## 5.15.0 (2022-07-19) 25 26 ### Changes 27 28 * [#622](https://github.com/clojure-emacs/clojure-mode/issues/622): Add font locking for missing `clojure.core` macros. 29 * [#615](https://github.com/clojure-emacs/clojure-mode/issues/615): Support clojure-dart files. 30 31 ### Bugs fixed 32 33 * [#595](https://github.com/clojure-emacs/clojure-mode/issues/595), [#612](https://github.com/clojure-emacs/clojure-mode/issues/612): Fix buffer freezing when typing metadata for a definition. 34 35 ## 5.14.0 (2022-03-07) 36 37 ### New features 38 39 * Allow additional directories, beyond the default `clj[sc]`, to be correctly formulated by `clojure-expected-ns` via new `defcustom` entitled `clojure-directory-prefixes` 40 * Recognize babashka projects (identified by the presence of `bb.edn`). 41 * [#601](https://github.com/clojure-emacs/clojure-mode/pull/601): Add new command `clojure-promote-fn-literal` for converting `#()` function literals to `fn` form. 42 43 ### Changes 44 45 * [#604](https://github.com/clojure-emacs/clojure-mode/pull/604): Add `bb` (babashka) to `interpreter-mode-alist`. 46 47 ### Bugs fixed 48 49 * [#608](https://github.com/clojure-emacs/clojure-mode/issues/608) Fix alignment issue involving margin comments at the end of nested forms. 50 51 ## 5.13.0 (2021-05-05) 52 53 ### New features 54 55 * [#590](https://github.com/clojure-emacs/clojure-mode/pull/590): Extend `clojure-rename-ns-alias` to work on selected regions. 56 * [#567](https://github.com/clojure-emacs/clojure-mode/issues/567): Add new commands `clojure-toggle-ignore`, `clojure-toggle-ignore-surrounding-form`, and `clojure-toggle-defun` for inserting/deleting `#_` ignore forms. 57 * [#582](https://github.com/clojure-emacs/clojure-mode/pull/582): Add `clojure-special-arg-indent-factor` to control special argument indentation. 58 59 ### Bugs fixed 60 61 * [#588](https://github.com/clojure-emacs/clojure-mode/pull/588): Fix font-lock for character literals. 62 * Stop `clojure-sort-ns` from calling `redisplay`. 63 64 ### Changes 65 66 * [#589](https://github.com/clojure-emacs/clojure-mode/issues/589): Improve font-locking performance on strings with escaped characters. 67 * [#571](https://github.com/clojure-emacs/clojure-mode/issues/571): Remove `project.el` integration. 68 * [#574](https://github.com/clojure-emacs/clojure-mode/issues/574): Remove `clojure-view-grimoire` command. 69 * [#584](https://github.com/clojure-emacs/clojure-mode/issues/584): Align to recent `pcase` changes on Emacs master. 70 71 ## 5.12.0 (2020-08-13) 72 73 ### New features 74 75 * [#556](https://github.com/clojure-emacs/clojure-mode/issues/556): `clojure-rename-ns-alias` picks up existing aliases for minibuffer completion. 76 77 ### Bugs fixed 78 79 * [#565](https://github.com/clojure-emacs/clojure-mode/issues/565): Fix extra spaces being inserted after quote in paredit-mode. 80 * [#544](https://github.com/clojure-emacs/clojure-mode/issues/544): Fix docstring detection when string contains backslash. 81 * [#547](https://github.com/clojure-emacs/clojure-mode/issues/547): Fix font-lock regex for character literals for uppercase chars and other symbols. 82 * [#556](https://github.com/clojure-emacs/clojure-mode/issues/556): Fix renaming of ns aliases containing regex characters. 83 * [#555](https://github.com/clojure-emacs/clojure-mode/issues/555): Fix ns detection for ns forms with complex metadata. 84 * [#550](https://github.com/clojure-emacs/clojure-mode/issues/550): Fix `outline-regexp` so `outline-insert-heading` behaves correctly. 85 * [#551](https://github.com/clojure-emacs/clojure-mode/issues/551): Indent `clojure-align` region before aligning. 86 * [#520](https://github.com/clojure-emacs/clojure-mode/issues/508): Fix allow `clojure-align-cond-forms` to recognize qualified forms. 87 * [#404](https://github.com/clojure-emacs/clojure-mode/issues/404)/[#528]((https://github.com/clojure-emacs/clojure-mode/issues/528)): Fix syntax highlighting for multiple consecutive comment reader macros (`#_#_`). 88 89 ### Changes 90 91 * Inline definition of `clojure-mode-syntax-table` and support `'` quotes in symbols. 92 * Enhance add arity refactoring to support a `defn` inside a reader conditional. 93 * Enhance add arity refactoring to support new forms: `letfn`, `fn`, `defmacro`, `defmethod`, `defprotocol`, `reify` and `proxy`. 94 95 ## 5.11.0 (2019-07-16) 96 97 ### New features 98 99 * [#496](https://github.com/clojure-emacs/clojure-mode/issues/496): Highlight `[[wikilinks]]` in comments. 100 * [#366](https://github.com/clojure-emacs/clj-refactor.el/issues/366): Add support for renaming ns aliases (`clojure-rename-ns-alias`, default binding `C-c C-r n r`). 101 * [#410](https://github.com/clojure-emacs/clojure-mode/issues/410): Add support for adding an arity to a function (`clojure-add-arity`, default binding `C-c C-r a`). 102 103 ### Bugs fixed 104 105 * Dynamic vars whose names contain non-alphanumeric characters are now font-locked correctly. 106 * [#445 (comment)](https://github.com/clojure-emacs/clojure-mode/issues/445#issuecomment-340460753): Proper font-locking for namespaced keywords like for example `(s/def ::keyword)`. 107 * [#508](https://github.com/clojure-emacs/clojure-mode/issues/508): Fix font-locking for namespaces with metadata. 108 * [#506](https://github.com/clojure-emacs/clojure-mode/issues/506): `clojure-mode-display-version` correctly displays the package's version. 109 * [#445](https://github.com/clojure-emacs/clojure-mode/issues/445), [#405](https://github.com/clojure-emacs/clojure-mode/issues/405), [#469](https://github.com/clojure-emacs/clojure-mode/issues/469): Correct font-locking on string definitions with docstrings, e.g: `(def foo "doc" "value")`. Correct indentation as well. 110 * [#518](https://github.com/clojure-emacs/clojure-mode/issues/518): Fix `clojure-find-ns` when there's an `ns` form inside a string. 111 * [#530](https://github.com/clojure-emacs/clojure-mode/pull/530): Prevent electric indentation within inlined docstrings. 112 113 ### Changes 114 115 * [#524](https://github.com/clojure-emacs/clojure-mode/issues/524): Add proper indentation rule for `delay` (same as for `future`). 116 * [#538](https://github.com/clojure-emacs/clojure-mode/pull/538): Refactor `clojure-unwind` to take numeric prefix argument for unwinding N steps, and universal argument for unwinding completely. The dedicated `C-c C-r a` binding for `clojure-unwind-all`is now removed and replaced with the universal arg convention `C-u C-c C-r u`. 117 118 ## 5.10.0 (2019-01-05) 119 120 ### New features 121 122 * Recognize Gradle projects using the new Kotlin DSL (`build.gradle.kts`). 123 * [#481](https://github.com/clojure-emacs/clojure-mode/issues/481): Support vertical alignment even in the presence of blank lines, with the new `clojure-align-separator` user option. 124 * [#483](https://github.com/clojure-emacs/clojure-mode/issues/483): Support alignment for reader conditionals, with the new `clojure-align-reader-conditionals` user option. 125 * [#497](https://github.com/clojure-emacs/clojure-mode/pull/497): Indent "let", "when" and "while" as function form if not at start of a symbol. 126 127 ### Bugs fixed 128 129 * [#489](https://github.com/clojure-emacs/clojure-mode/issues/489): Inserting parens before comment form doesn't move point. 130 * [#500](https://github.com/clojure-emacs/clojure-mode/pull/500): Fix project.el integration. 131 * [#513](https://github.com/clojure-emacs/clojure-mode/pull/513): Fix incorrect indentation of namespaced map. 132 133 ### Changes 134 135 * Change the accepted values of `clojure-indent-style` from keywords to symbols. 136 * [#503](https://github.com/clojure-emacs/clojure-mode/pull/503): Fix Makefile so that we can compile again. 137 138 ## 5.9.1 (2018-08-27) 139 140 * [#485](https://github.com/clojure-emacs/clojure-mode/issues/485): Fix a regression in `end-f-defun`. 141 142 ## 5.9.0 (2018-08-18) 143 144 ### Changes 145 146 * Add `clojure-toplevel-inside-comment-form` to make forms inside of `(comment ...)` forms appear as top level forms for evaluation and navigation. 147 * Require Emacs 25.1+. 148 149 ## 5.8.2 (2018-08-09) 150 151 ### Changes 152 153 * Disable ns caching by default. 154 155 ## 5.8.1 (2018-07-03) 156 157 ### Bugs fixed 158 159 * Fix the project.el integration. 160 161 ## 5.8.0 (2018-06-26) 162 163 ### New features 164 165 * New interactive commands `clojure-show-cache` and `clojure-clear-cache`. 166 * Add basic integration with `project.el`. 167 * The results of `clojure-project-dir` are cached by default to optimize performance. 168 * [#478](https://github.com/clojure-emacs/clojure-mode/issues/478): Cache the result of `clojure-find-ns` to optimize performance. 169 170 ### Changes 171 172 * Indent `fdef` (clojure.spec) like a `def`. 173 * Add `shadow-cljs.edn` to the default list of build tool files. 174 175 ## 5.7.0 (2018-04-29) 176 177 ### New features 178 179 * Add imenu support for multimethods. 180 * Make imenu recognize indented def-forms. 181 * New interactive command `clojure-cycle-when`. 182 * New interactive command `clojure-cycle-not`. 183 * New defcustom `clojure-comment-regexp` for font-locking `#_` or `#_` AND `(comment)` sexps. 184 * [#459](https://github.com/clojure-emacs/clojure-mode/issues/459): Add font-locking for new built-ins added in Clojure 1.9. 185 * [#471](https://github.com/clojure-emacs/clojure-mode/issues/471): Support tagged maps (new in Clojure 1.9) in paredit integration. 186 * Consider `deps.edn` a project root. 187 * [#467](https://github.com/clojure-emacs/clojure-mode/issues/467): Make `prog-mode-map` the parent keymap for `clojure-mode-map`. 188 189 ### Changes 190 191 * Drop support for CLJX. 192 * Remove special font-locking of Java interop methods & constants: There is no semantic distinction between interop methods, constants and global vars in Clojure. 193 194 ### Bugs fixed 195 196 * [#458](https://github.com/clojure-emacs/clojure-mode/pull/458): Get correct ns when in middle of ns form with `clojure-find-ns` 197 * [#447](https://github.com/clojure-emacs/clojure-mode/issues/241): When `electric-indent-mode` is on, force indentation from within docstrings. 198 * [#438](https://github.com/clojure-emacs/clojure-mode/issues/438): Filling within a doc-string doesn't affect surrounding code. 199 * Fix fill-paragraph in multi-line comments. 200 * [#443](https://github.com/clojure-emacs/clojure-mode/issues/443): Fix behavior of `clojure-forward-logical-sexp` and `clojure-backward-logical-sexp` with conditional macros. 201 * [#429](https://github.com/clojure-emacs/clojure-mode/issues/429): Fix a bug causing last occurrence of expression sometimes is not replaced when using `move-to-let`. 202 * [#423](https://github.com/clojure-emacs/clojure-mode/issues/423): Make `clojure-match-next-def` more robust against zero-arity def-like forms. 203 * [#451](https://github.com/clojure-emacs/clojure-mode/issues/451): Make project root directory calculation customized by `clojure-project-root-function`. 204 * Fix namespace font-locking: namespaces may also contain non alphanumeric chars. 205 206 207 ## 5.6.1 (2016-12-21) 208 209 ### Bugs fixed 210 211 * Make `clojure--read-let-bindings` more robust so `let` related refactorings do not bail on an incorrectly formatted binding form. 212 213 ## 5.6.0 (2016-11-18) 214 215 ### New features 216 217 * New interactive command `clojure-mode-report-bug`. 218 * New interactive command `clojure-view-guide`. 219 * New interactive command `clojure-view-reference-section`. 220 * New interactive command `clojure-view-cheatsheet`. 221 * New interactive command `clojure-view-grimoire`. 222 * New interactive command `clojure-view-style-guide`. 223 * Make the refactoring keymap prefix customizable via `clojure-refactor-map-prefix`. 224 * Port and rework `let`-related features from `clj-refactor`. Available features: introduce `let`, move to `let`, forward slurp form into `let`, backward slurp form into `let`. 225 226 ### Changes 227 228 * `clojure-mode` now requires Emacs 24.4. 229 230 ## 5.5.2 (2016-08-03) 231 232 ### Bugs fixed 233 234 * [#399](https://github.com/clojure-emacs/clojure-mode/issues/399): Fix fontification of prefix characters inside keywords. 235 236 ## 5.5.1 (2016-07-25) 237 238 ### Bugs fixed 239 240 * [#394](https://github.com/clojure-emacs/clojure-mode/issues/394): `?` character is now treated as prefix when outside symbols. 241 * [#394](https://github.com/clojure-emacs/clojure-mode/issues/394): `#` character now has prefix syntax class. 242 * Fixed indentation of `definterface` to match that of `defprotocol`. 243 * [#389](https://github.com/clojure-emacs/clojure-mode/issues/389): Fixed the indentation of `defrecord` and `deftype` multiple airity protocol forms. 244 * [#393](https://github.com/clojure-emacs/clojure-mode/issues/393): `imenu-generic-expression` is no longer hard-coded and its global value is respected. 245 246 ## 5.5.0 (2016-06-25) 247 248 ### New features 249 250 * Port cycle privacy, cycle collection type and cycle if/if-not from clj-refactor.el. 251 * Rework cycle collection type into convert collection to list, quoted list, map, vector, set. 252 253 ## 5.4.0 (2016-05-21) 254 255 ### New features 256 257 * When aligning forms with `clojure-align` (or with the automatic align feature), blank lines will divide alignment regions. 258 * [#378](https://github.com/clojure-emacs/clojure-mode/issues/378): Font-lock escape characters in strings. 259 * Port threading macros related features from clj-refactor.el. Available refactorings: thread, unwind, thread first all, thread last all, unwind all. 260 * New command: `clojure-sort-ns`. 261 * All ns manipulation commands have keybindings under `C-c C-r n`. 262 263 ## 5.3.0 (2016-04-04) 264 265 ### Bugs fixed 266 267 * [#371](https://github.com/clojure-emacs/clojure-mode/issues/371): Don't font-lock `:foo/def` like a `def` form. 268 * [#367](https://github.com/clojure-emacs/clojure-mode/issues/367): `clojure-align` no longer gets confused with commas. In fact, now it even removes extra commas. 269 270 ### New features 271 272 * [#370](https://github.com/clojure-emacs/clojure-mode/issues/370): Warn the user if they seem to have activated the wrong major-mode. 273 * Make the expected ns function configurable via `clojure-expected-ns-function`. 274 275 ## 5.2.0 (2016-02-04) 276 277 ### Bugs fixed 278 279 * [#361](https://github.com/clojure-emacs/clojure-mode/issues/361): Fixed a typo preventing the highlighting of fn names that don't start with `t`. 280 * [#360](https://github.com/clojure-emacs/clojure-mode/issues/360): `clojure-align` now reindents after aligning, which also fixes an issue with nested alignings. 281 282 ### New features 283 284 * [#362](https://github.com/clojure-emacs/clojure-mode/issues/362): New custom option `clojure-indent-style` offers 3 different ways to indent code. 285 286 ## 5.1.0 (2016-01-04) 287 288 ### New features 289 290 * Vertically align sexps with `C-c SPC`. This can also be done automatically (as part of indentation) by turning on `clojure-align-forms-automatically`. 291 * Indent and font-lock forms that start with `let-`, `while-` or `when-` like their counterparts. 292 * Apply the `font-lock-comment-face` to code commented out with `#_`. 293 * Add indentation config for ClojureScript's `this-as`. 294 295 ### Bugs fixed 296 297 * Namespaces can now use the full palette of legal symbol characters. 298 * Namespace font-locking according to `clojure.lang.LispReader`. 299 * Fixed the indentation for `specify` and `specify!`. 300 * Fixed the docstring indentation for `defprotocol`. 301 302 ## 5.0.1 (2015-11-15) 303 304 ### Bugs fixed 305 306 * Don't treat the symbol `default-(something)` as def* macro. 307 * `cider-find-ns` now returns the closest `ns` instead of the first one. 308 * [#344](https://github.com/clojure-emacs/clojure-mode/issues/344): Fixed the indentation of `extend-type`. 309 310 ## 5.0.0 (2015-10-30) 311 312 ### New features 313 314 * [#302](https://github.com/clojure-emacs/clojure-mode/pull/302): Add new sexp navigation commands. `clojure-forward-logical-sexp` and `clojure-backward-logical-sexp` consider `^hints` and `#reader.macros` to be part of the sexp that follows them. 315 * [#303](https://github.com/clojure-emacs/clojure-mode/issues/303): Handle `boot` projects in `clojure-expected-ns`. 316 * Added dedicated modes for ClojureScript, ClojureC and ClojureX. All of them are derived from `clojure-mode`. 317 * Added support for Gradle projects. 318 * Vastly improved indentation engine. 319 * Added support for reader conditionals. 320 * Improved font-locking of namespaced symbols. 321 322 ### Bugs fixed 323 324 * [#310](https://github.com/clojure-emacs/clojure-mode/issues/310) and [#311](https://github.com/clojure-emacs/clojure-mode/issues/311) Fix `clojure-expected-ns` in multi-source projects. 325 * [#307](https://github.com/clojure-emacs/clojure-mode/issues/307): Don't highlight `handle` and `handler-case` as keywords. 326 * Fix font-locking for def with special chars such as: `defn*`, `defspecial!`. 327 * Numerous indentation issues. 328 329 ## 4.1.0 (2015-06-20) 330 331 ### Changes 332 333 * Add `.cljc` to `auto-mode-alist`. 334 * [#281](https://github.com/clojure-emacs/clojure-mode/pull/281): Add support for namespace-prefixed definition forms. 335 * Remove `clojure-mark-string`. 336 * [#283](https://github.com/clojure-emacs/clojure-mode/pull/283): You can now specify different indentation settings for ns-prefixed symbols. 337 * [#285](https://github.com/clojure-emacs/clojure-mode/issues/285): Require Emacs 24.3+. 338 339 ### Bugs fixed 340 341 * Prevent error when calling `indent-for-tab-command` at the start of 342 the buffer at end of line. 343 * [#274](https://github.com/clojure-emacs/clojure-mode/issues/274): Correct font-locking of certain punctuation character literals. 344 * Fix font-locking of namespace-prefixed dynamic vars (e.g. `some.ns/*var*`). 345 * [#284](https://github.com/clojure-emacs/clojure-mode/issues/284): Fix the indentation of the `are` macro. 346 347 ## 4.0.1 (2014-12-19) 348 349 ### Bugs fixed 350 351 * Indent properly `as->`. 352 * Revert the indentation settings for `->`, `->>`, `some->` and `some->>`. 353 354 ## 4.0.0 (2014-12-12) 355 356 ### Changes 357 358 * Removed `inferior-lisp` integration in favor of `inf-clojure`. 359 * Indented the body of `cond` with 2 spaces. 360 * Removed special indentation settings for `defstruct`, `struct-map` and `assoc`. 361 * Added special indentation settings for `->`, `->>`, `cond->`, `cond->>`, `some->` and `some->>`. 362 363 ## 3.0.1 (2014-11-24) 364 365 ### Bugs fixed 366 367 * Numerous font-lock bug fixes. 368 * [#260](https://github.com/clojure-emacs/clojure-mode/pull/260): Don't treat `@` as a word character. 369 * [#239](https://github.com/clojure-emacs/clojure-mode/issues/239): Indent properly multi-arity definitions. 370 371 ## 3.0.0 (2014-09-02) 372 373 ### New features 374 375 * Added font-locking for namespaces and namespace aliases. 376 * Added font-locking for character literals. 377 * Added font-locking for constants. 378 * Added font-locking for dynamic vars. 379 * Added font-locking for `cljx`. 380 * Various docstring filling improvements. 381 * Introduced additional faces for keyword literals, character literals and 382 interop method invocations. 383 * Added support for `prettify-symbols-mode`. 384 385 ### Changes 386 387 * Emacs 24.1 is required. 388 * Removed deprecated `clojure-font-lock-comment-sexp`. 389 * Renamed `clojure-mode-font-lock-setup` to `clojure-font-lock-setup`. 390 * Some font-locking was extracted to a separate package. ([clojure-mode-extra-font-locking](https://github.com/clojure-emacs/clojure-mode/blob/master/clojure-mode-extra-font-locking.el)). 391 392 ### Bugs fixed 393 394 * Properly font-lock docstrings regardless of the presence of metadata or type hints.