Skip to content

Commit fada602

Browse files
committed
Introduce cljr-print-right-margin, cljr-print-miser-width customization options
Fixes #504
1 parent 7bec405 commit fada602

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
## 3.2.0 (2021-11-16)
6+
7+
- [#504](https://github.com/clojure-emacs/clj-refactor.el/issues/504): Introduce `cljr-print-right-margin`, `cljr-print-miser-width` customization options which control the line wrapping of ns forms after formatting them (as performed after `clean-ns`, `rename-file-or-dir`, etc).
8+
59
## 3.1.0 (2021-11-10)
610

711
- Use refactor-nrepl [3.1.0](https://github.com/clojure-emacs/refactor-nrepl/blob/a6b052809e6c2c8b077bf0ae4684e05af0a5f484/CHANGELOG.md#310-2021-11-09).

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@ clj-refactor | refactor-nrepl | CIDER | Clojure | Java |
6969
-------------|----------------|-------------|---------|------|
7070
2.4.0 | 2.4.0 | 0.17, 0.18 | 1.7+ | 8+ |
7171
2.5.0 | 2.5.0 | 0.24 | 1.8+ | 8+ |
72-
3.0.0. | 3.0.0 | 1.0 | 1.8+ | 8+ |
73-
3.1.0. | 3.1.0 | 1.0 | 1.8+ | 8+ |
72+
3.0.0 | 3.0.0 | 1.0 | 1.8+ | 8+ |
73+
3.1.0 | 3.1.0 | 1.0 | 1.8+ | 8+ |
74+
3.2.0 | 3.1.0 | 1.0 | 1.8+ | 8+ |
7475

7576
### Middleware
7677

clj-refactor.el

+27-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
;; Lars Andersen <[email protected]>
88
;; Benedek Fazekas <[email protected]>
99
;; Bozhidar Batsov <[email protected]>
10-
;; Version: 3.1.0
10+
;; Version: 3.2.0
1111
;; Keywords: convenience, clojure, cider
1212

1313
;; Package-Requires: ((emacs "26.1") (seq "2.19") (yasnippet "0.6.1") (paredit "24") (multiple-cursors "1.2.2") (clojure-mode "5.9") (cider "1.0") (parseedn "1.0.6") (inflections "2.3") (hydra "0.13.2"))
@@ -2780,6 +2780,30 @@ Also adds the alias prefix to all occurrences of public symbols in the namespace
27802780
(insert new-ns)
27812781
(cljr--just-one-blank-line)))
27822782

2783+
(defcustom cljr-print-right-margin "72"
2784+
"Will be forwarded to `clojure.pprint/*print-right-margin*'
2785+
when refactor-nrepl pretty-prints ns forms,
2786+
as performed after `clean-ns', `rename-file-or-dir', etc.
2787+
You can set it to the string \"nil\" for disabling line wrapping.
2788+
2789+
See also: `cljr-print-miser-width'."
2790+
:group 'cljr
2791+
:type 'string
2792+
:safe #'stringp
2793+
:package-version "3.2.0")
2794+
2795+
(defcustom cljr-print-miser-width "40"
2796+
"Will be forwarded to `clojure.pprint/*print-miser-width*'
2797+
when refactor-nrepl pretty-prints ns forms,
2798+
as performed after `clean-ns', `rename-file-or-dir', etc.
2799+
You can set it to the string \"nil\" for disabling line wrapping.
2800+
2801+
See also: `cljr-print-right-margin'."
2802+
:group 'cljr
2803+
:type 'string
2804+
:safe #'stringp
2805+
:package-version "3.2.0")
2806+
27832807
(defun cljr--clean-ns (&optional path no-prune?)
27842808
"If PATH is passed use that instead of the path to the current buffer
27852809
@@ -2796,6 +2820,8 @@ removed."
27962820
"path" path
27972821
"relative-path" relative-path
27982822
"libspec-whitelist" cljr-libspec-whitelist
2823+
"print-right-margin" cljr-print-right-margin
2824+
"print-miser-width" cljr-print-miser-width
27992825
"prune-ns-form" (if no-prune? "false"
28002826
"true"))
28012827
"ns"))

0 commit comments

Comments
 (0)