Skip to content

Commit f42b262

Browse files
committed
Rename cider-prompt-save-file-on-load to cider-save-file-on-load
This also adjusts its supported values accordingly - the default now is `'prompt` and `'always-save` is now simply `t`.
1 parent cbad6b2 commit f42b262

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
* Drop support for Emacs 24.3.
3030
* Don't try to use ssh automatically when connecting to remote hosts and a direct connection fails. See `nrepl-use-ssh-fallback-for-remote-hosts`.
3131
* [#1945](https://github.com/clojure-emacs/cider/pull/1945): Start nREPL servers bound to `::` by default using `cider-jack-in`.
32+
* Renamed `cider-prompt-save-file-on-load` to `cider-save-file-on-load` and adjust its supported values accordingly (the default now is `'prompt` and `'always-save` is now simply `t`).
3233

3334
### Bugs Fixed
3435

cider-interaction.el

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,19 @@ ns forms manually themselves."
100100
:group 'cider
101101
:package-version '(cider . "0.15.0"))
102102

103-
(defcustom cider-prompt-save-file-on-load t
103+
(defcustom cider-save-file-on-load 'prompt
104104
"Controls whether to prompt to save the file when loading a buffer.
105105
If nil, files are not saved.
106-
If t, the user is prompted to save the file if it's been modified.
107-
If the symbol `always-save', save the file without confirmation."
108-
:type '(choice (const t :tag "Prompt to save the file if it's been modified")
106+
If 'prompt, the user is prompted to save the file if it's been modified.
107+
If t, save the file without confirmation."
108+
:type '(choice (const prompt :tag "Prompt to save the file if it's been modified")
109109
(const nil :tag "Don't save the file")
110-
(const always-save :tag "Save the file without confirmation"))
110+
(const t :tag "Save the file without confirmation"))
111111
:group 'cider
112112
:package-version '(cider . "0.6.0"))
113113

114+
(define-obsolete-variable-alias 'cider-prompt-save-file-on-load 'cider-save-file-on-load "0.15.0")
115+
114116
(defcustom cider-prompt-save-files-on-cider-refresh t
115117
"Controls whether to prompt to save Clojure files on `cider-refresh'.
116118
If nil, files are not saved.
@@ -1611,9 +1613,9 @@ ClojureScript REPL exists for the project, it is evaluated in both REPLs."
16111613
(with-current-buffer buffer
16121614
(unless buffer-file-name
16131615
(user-error "Buffer `%s' is not associated with a file" (current-buffer)))
1614-
(when (and cider-prompt-save-file-on-load
1616+
(when (and cider-save-file-on-load
16151617
(buffer-modified-p)
1616-
(or (eq cider-prompt-save-file-on-load 'always-save)
1618+
(or (eq cider-save-file-on-load t)
16171619
(y-or-n-p (format "Save file %s? " buffer-file-name))))
16181620
(save-buffer))
16191621
(remove-overlays nil nil 'cider-temporary t)

doc/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ make the hidden buffers visible. They'll always be visible in
6060

6161
```el
6262
;; Don't prompt and don't save
63-
(setq cider-prompt-save-file-on-load nil)
63+
(setq cider-save-file-on-load nil)
6464
;; Just save without prompting
65-
(setq cider-prompt-save-file-on-load 'always-save)
65+
(setq cider-save-file-on-load t)
6666
```
6767

6868
* Change the result prefix for interactive evaluation (by default it's `=> `):

0 commit comments

Comments
 (0)