Skip to content

Commit 814f72f

Browse files
committed
Replace cider-inspire-on-connect with cider-connection message
While digging through the code I've noticed that it was still around and offers a slightly more generic behavior.
1 parent 26b98a2 commit 814f72f

File tree

3 files changed

+9
-16
lines changed

3 files changed

+9
-16
lines changed

Diff for: CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
## New features
66

77
* Add new interactive command `cider-inspire-me`. It does what you'd expect.
8-
* Add new defcustom `cider-inspire-on-connect`, which controls whether to display an inspiration message on connect.
98

109
### Changes
1110

Diff for: cider-connection.el

-8
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,6 @@ See `cider-format-connection-params' for available format characters."
4545
:group 'cider
4646
:package-version '(cider . "0.18.0"))
4747

48-
(defcustom cider-connection-message-fn #'cider-random-words-of-inspiration
49-
"The function to use to generate the message displayed on connect.
50-
When set to nil no additional message will be displayed. A good
51-
alternative to the default is `cider-random-tip'."
52-
:type 'function
53-
:group 'cider
54-
:package-version '(cider . "0.11.0"))
55-
5648
(defcustom cider-redirect-server-output-to-repl t
5749
"Controls whether nREPL server output would be redirected to the REPL.
5850
When non-nil the output would end up in both the nrepl-server buffer (when

Diff for: cider.el

+9-7
Original file line numberDiff line numberDiff line change
@@ -1637,16 +1637,18 @@ assume the command is available."
16371637
(executable-find (concat command ".bat")))))
16381638
(shell-quote-argument command)))
16391639

1640-
(defcustom cider-inspire-on-connect t
1641-
"Controls whether to display an inspirational message on connect."
1642-
:type 'boolean
1643-
:package-version '(cider . "1.4.0")
1644-
:safe #'booleanp)
1640+
(defcustom cider-connection-message-fn #'cider-random-words-of-inspiration
1641+
"The function to use to generate the message displayed on connect.
1642+
When set to nil no additional message will be displayed. A good
1643+
alternative to the default is `cider-random-tip'."
1644+
:type 'function
1645+
:group 'cider
1646+
:package-version '(cider . "0.11.0"))
16451647

16461648
(defun cider--maybe-inspire-on-connect ()
16471649
"Display an inspiration connection message."
1648-
(when cider-inspire-on-connect
1649-
(message "Connected! %s" (cider-random-words-of-inspiration))))
1650+
(when cider-connection-message-fn
1651+
(message "Connected! %s" (funcall cider-connection-message-fn))))
16501652

16511653
(add-hook 'cider-connected-hook #'cider--maybe-inspire-on-connect)
16521654

0 commit comments

Comments
 (0)