diff options
author | Ted Zlatanov <tzz@lifelogs.com> | 2016-07-27 15:22:02 -0400 |
---|---|---|
committer | Ted Zlatanov <tzz@lifelogs.com> | 2016-07-27 15:22:02 -0400 |
commit | ec359399a47f852b4d022a30245449438e349193 (patch) | |
tree | 9469eebbac4c9875614d69837eb5aeaf430c1be7 | |
parent | 773778e1c0cac41bf4b6a254db43d6ded21c331b (diff) |
Prompt to save gnus-cloud-method.
Since `gnus-cloud-method' is a defcustom, when it's set, we should
prompt the user to save it, so the customization is not lost on
restart.
* gnus-srvr.el (gnus-server-toggle-cloud-method-server): Prompt to
save the customization of `gnus-cloud-method'.
-rw-r--r-- | lisp/gnus/gnus-srvr.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 66fb9ee1b5..6dbb54efb4 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -1156,7 +1156,12 @@ Requesting compaction of %s... (this may take a long time)" (unless (gnus-cloud-host-acceptable-method-p server) (error "The server under point can't host the Emacs Cloud")) - (custom-set-variables '(gnus-cloud-method server)) + (when (not (string-equal gnus-cloud-method server)) + (custom-set-variables '(gnus-cloud-method server)) + ;; Note we can't use `Custom-save' here. + (when (gnus-yes-or-no-p + (format "The new cloud host server is %S now. Save it? " server)) + (customize-save-variable 'gnus-cloud-method server))) (when (gnus-yes-or-no-p (format "Upload Cloud data to %S now? " server)) (gnus-message 1 "Uploading all data to Emacs Cloud server %S" server) (gnus-cloud-upload-data t)))) |