[gnus git] branch master updated: n0-13-46-gdc34b73 =1= Refine the save behavior with `auth-source-save-behavior'.
Ted Zlatanov <[email protected]>
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via dc34b73127ae3c4ed396658292b0da583168371f (commit)
from e9156c3bb674c2423e992c544ae8616a340e8003 (commit)
- Log -----------------------------------------------------------------
commit dc34b73127ae3c4ed396658292b0da583168371f
Author: Ted Zlatanov <[email protected]>
Date: Fri Feb 25 05:47:32 2011 -0600
Refine the save behavior with `auth-source-save-behavior'.
* auth-source.el (auth-source-save-behavior): New variable to replace
`auth-source-never-create'.
(auth-source-netrc-create): Use it.
(auth-source-never-save): Remove.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ce91cd9..65e391f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2011-02-25 Teodor Zlatanov <[email protected]>
+
+ * auth-source.el (auth-source-save-behavior): New variable to replace
+ `auth-source-never-create'.
+ (auth-source-netrc-create): Use it.
+ (auth-source-never-save): Remove.
+
2011-02-25 Lars Ingebrigtsen <[email protected]>
* nnimap.el (nnimap-stream): Doc fix.
diff --git a/lisp/auth-source.el b/lisp/auth-source.el
index d1e258c..80b1398 100644
--- a/lisp/auth-source.el
+++ b/lisp/auth-source.el
@@ -152,11 +152,15 @@ let-binding."
(make-obsolete 'auth-source-hide-passwords nil "Emacs 24.1")
-(defcustom auth-source-never-save nil
- "If set, auth-source will never ask to save."
+(defcustom auth-source-save-behavior 'ask
+ "If set, auth-source will respect it for save behavior."
:group 'auth-source
:version "23.2" ;; No Gnus
- :type `boolean)
+ :type `(choice
+ :tag "auth-source new token save behavior"
+ (const :tag "Always save" t)
+ (const :tag "Never save" nil)
+ (const :tag "Ask" ask)))
(defvar auth-source-magic "auth-source-magic ")
@@ -1083,7 +1087,7 @@ See `auth-source-search' for details on SPEC."
(let ((prompt (format "Save auth info to file %s? %s: "
file
"y/n/N/e/?"))
- (done auth-source-never-save)
+ (done (not (eq auth-source-save-behavior 'ask)))
(bufname "*auth-source Help*")
k)
(while (not done)
@@ -1105,7 +1109,7 @@ See `auth-source-search' for details on SPEC."
done t))
(?N (setq add ""
done t
- auth-source-never-save t))
+ auth-source-save-behavior nil))
(?e (setq add (read-string "Line to add: " add)))
(t nil)))
@@ -1113,7 +1117,7 @@ See `auth-source-search' for details on SPEC."
(delete-window (get-buffer-window bufname)))
;; make sure the info is not saved
- (when auth-source-never-save
+ (when (null auth-source-save-behavior)
(setq add ""))
(when (< 0 (length add))
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 7 +++++++
lisp/auth-source.el | 16 ++++++++++------
2 files changed, 17 insertions(+), 6 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project