aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2012-06-01 16:12:11 -0400
committerStefan Monnier2012-06-01 16:12:11 -0400
commitcbffd0bdfe19dbce25239fd9954126753457f5c8 (patch)
tree92ea82c66de375661a125f292107ed7164c2819e
parent4a5f187ae20859e88436f05638ecc9e0e32a4961 (diff)
downloademacs-cbffd0bdfe19dbce25239fd9954126753457f5c8.tar.gz
emacs-cbffd0bdfe19dbce25239fd9954126753457f5c8.zip
* lisp/gnus/auth-source.el: Fix comment-style to follow the convention.
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gnus/auth-source.el66
2 files changed, 37 insertions, 33 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 3060c08ec51..95fb18bfbd7 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,7 @@
12012-06-01 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * auth-source.el: Fix comment-style to follow the convention.
4
12012-05-27 Katsumi Yamaoka <yamaoka@jpl.org> 52012-05-27 Katsumi Yamaoka <yamaoka@jpl.org>
2 6
3 * gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is 7 * gnus-msg.el (gnus-msg-mail): Ensure that gnus-newsgroup-name is
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index d3d213a753b..47359500dc4 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -91,9 +91,9 @@ let-binding."
91 (const :tag "30 Minutes" 1800) 91 (const :tag "30 Minutes" 1800)
92 (integer :tag "Seconds"))) 92 (integer :tag "Seconds")))
93 93
94;;; The slots below correspond with the `auth-source-search' spec, 94;; The slots below correspond with the `auth-source-search' spec,
95;;; so a backend with :host set, for instance, would match only 95;; so a backend with :host set, for instance, would match only
96;;; searches for that host. Normally they are nil. 96;; searches for that host. Normally they are nil.
97(defclass auth-source-backend () 97(defclass auth-source-backend ()
98 ((type :initarg :type 98 ((type :initarg :type
99 :initform 'netrc 99 :initform 'netrc
@@ -148,8 +148,8 @@ let-binding."
148 (repeat :tag "Names" 148 (repeat :tag "Names"
149 (string :tag "Name"))))) 149 (string :tag "Name")))))
150 150
151;;; generate all the protocols in a format Customize can use 151;; Generate all the protocols in a format Customize can use.
152;;; TODO: generate on the fly from auth-source-protocols 152;; TODO: generate on the fly from auth-source-protocols
153(defconst auth-source-protocols-customize 153(defconst auth-source-protocols-customize
154 (mapcar (lambda (a) 154 (mapcar (lambda (a)
155 (let ((p (car-safe a))) 155 (let ((p (car-safe a)))
@@ -338,7 +338,7 @@ If the value is not a list, symmetric encryption will be used."
338 msg)) 338 msg))
339 339
340 340
341;;; (auth-source-read-char-choice "enter choice? " '(?a ?b ?q)) 341;; (auth-source-read-char-choice "enter choice? " '(?a ?b ?q))
342(defun auth-source-read-char-choice (prompt choices) 342(defun auth-source-read-char-choice (prompt choices)
343 "Read one of CHOICES by `read-char-choice', or `read-char'. 343 "Read one of CHOICES by `read-char-choice', or `read-char'.
344`dropdown-list' support is disabled because it doesn't work reliably. 344`dropdown-list' support is disabled because it doesn't work reliably.
@@ -710,10 +710,10 @@ must call it to obtain the actual value."
710 (setq matches (append matches bmatches)))))) 710 (setq matches (append matches bmatches))))))
711 matches)) 711 matches))
712 712
713;;; (auth-source-search :max 1) 713;; (auth-source-search :max 1)
714;;; (funcall (plist-get (nth 0 (auth-source-search :max 1)) :secret)) 714;; (funcall (plist-get (nth 0 (auth-source-search :max 1)) :secret))
715;;; (auth-source-search :host "nonesuch" :type 'netrc :K 1) 715;; (auth-source-search :host "nonesuch" :type 'netrc :K 1)
716;;; (auth-source-search :host "nonesuch" :type 'secrets) 716;; (auth-source-search :host "nonesuch" :type 'secrets)
717 717
718(defun* auth-source-delete (&rest spec 718(defun* auth-source-delete (&rest spec
719 &key delete 719 &key delete
@@ -775,16 +775,16 @@ This is the same SPEC you passed to `auth-source-search'.
775Returns t or nil for forgotten or not found." 775Returns t or nil for forgotten or not found."
776 (password-cache-remove (auth-source-format-cache-entry spec))) 776 (password-cache-remove (auth-source-format-cache-entry spec)))
777 777
778;;; (loop for sym being the symbols of password-data when (string-match (concat "^" auth-source-magic) (symbol-name sym)) collect (symbol-name sym)) 778;; (loop for sym being the symbols of password-data when (string-match (concat "^" auth-source-magic) (symbol-name sym)) collect (symbol-name sym))
779 779
780;;; (auth-source-remember '(:host "wedd") '(4 5 6)) 780;; (auth-source-remember '(:host "wedd") '(4 5 6))
781;;; (auth-source-remembered-p '(:host "wedd")) 781;; (auth-source-remembered-p '(:host "wedd"))
782;;; (auth-source-remember '(:host "xedd") '(1 2 3)) 782;; (auth-source-remember '(:host "xedd") '(1 2 3))
783;;; (auth-source-remembered-p '(:host "xedd")) 783;; (auth-source-remembered-p '(:host "xedd"))
784;;; (auth-source-remembered-p '(:host "zedd")) 784;; (auth-source-remembered-p '(:host "zedd"))
785;;; (auth-source-recall '(:host "xedd")) 785;; (auth-source-recall '(:host "xedd"))
786;;; (auth-source-recall '(:host t)) 786;; (auth-source-recall '(:host t))
787;;; (auth-source-forget+ :host t) 787;; (auth-source-forget+ :host t)
788 788
789(defun* auth-source-forget+ (&rest spec &allow-other-keys) 789(defun* auth-source-forget+ (&rest spec &allow-other-keys)
790 "Forget any cached data matching SPEC. Returns forgotten count. 790 "Forget any cached data matching SPEC. Returns forgotten count.
@@ -818,8 +818,8 @@ while \(:host t) would find all host entries."
818 (return 'no))) 818 (return 'no)))
819 'no)))) 819 'no))))
820 820
821;;; (auth-source-pick-first-password :host "z.lifelogs.com") 821;; (auth-source-pick-first-password :host "z.lifelogs.com")
822;;; (auth-source-pick-first-password :port "imap") 822;; (auth-source-pick-first-password :port "imap")
823(defun auth-source-pick-first-password (&rest spec) 823(defun auth-source-pick-first-password (&rest spec)
824 "Pick the first secret found from applying SPEC to `auth-source-search'." 824 "Pick the first secret found from applying SPEC to `auth-source-search'."
825 (let* ((result (nth 0 (apply 'auth-source-search (plist-put spec :max 1)))) 825 (let* ((result (nth 0 (apply 'auth-source-search (plist-put spec :max 1))))
@@ -867,7 +867,7 @@ while \(:host t) would find all host entries."
867(defun auth-source--aget (alist key) 867(defun auth-source--aget (alist key)
868 (cdr (assoc key alist))) 868 (cdr (assoc key alist)))
869 869
870;;; (auth-source-netrc-parse "~/.authinfo.gpg") 870;; (auth-source-netrc-parse "~/.authinfo.gpg")
871(defun* auth-source-netrc-parse (&rest 871(defun* auth-source-netrc-parse (&rest
872 spec 872 spec
873 &key file max host user port delete require 873 &key file max host user port delete require
@@ -1101,8 +1101,8 @@ FILE is the file from which we obtained this token."
1101 ret)) 1101 ret))
1102 alist)) 1102 alist))
1103 1103
1104;;; (setq secret (plist-get (nth 0 (auth-source-search :host t :type 'netrc :K 1 :max 1)) :secret)) 1104;; (setq secret (plist-get (nth 0 (auth-source-search :host t :type 'netrc :K 1 :max 1)) :secret))
1105;;; (funcall secret) 1105;; (funcall secret)
1106 1106
1107(defun* auth-source-netrc-search (&rest 1107(defun* auth-source-netrc-search (&rest
1108 spec 1108 spec
@@ -1148,8 +1148,8 @@ See `auth-source-search' for details on SPEC."
1148 (nth 0 v) 1148 (nth 0 v)
1149 v)) 1149 v))
1150 1150
1151;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t) 1151;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t)
1152;;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t :create-extra-keys '((A "default A") (B))) 1152;; (auth-source-search :host "nonesuch" :type 'netrc :max 1 :create t :create-extra-keys '((A "default A") (B)))
1153 1153
1154(defun* auth-source-netrc-create (&rest spec 1154(defun* auth-source-netrc-create (&rest spec
1155 &key backend 1155 &key backend
@@ -1404,12 +1404,12 @@ Respects `auth-source-save-behavior'. Uses
1404 1404
1405;;; Backend specific parsing: Secrets API backend 1405;;; Backend specific parsing: Secrets API backend
1406 1406
1407;;; (let ((auth-sources '(default))) (auth-source-search :max 1 :create t)) 1407;; (let ((auth-sources '(default))) (auth-source-search :max 1 :create t))
1408;;; (let ((auth-sources '(default))) (auth-source-search :max 1 :delete t)) 1408;; (let ((auth-sources '(default))) (auth-source-search :max 1 :delete t))
1409;;; (let ((auth-sources '(default))) (auth-source-search :max 1)) 1409;; (let ((auth-sources '(default))) (auth-source-search :max 1))
1410;;; (let ((auth-sources '(default))) (auth-source-search)) 1410;; (let ((auth-sources '(default))) (auth-source-search))
1411;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1)) 1411;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1))
1412;;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git")) 1412;; (let ((auth-sources '("secrets:Login"))) (auth-source-search :max 1 :signon_realm "https://git.gnus.org/Git"))
1413 1413
1414(defun* auth-source-secrets-search (&rest 1414(defun* auth-source-secrets-search (&rest
1415 spec 1415 spec
@@ -1719,7 +1719,7 @@ authentication tokens:
1719 1719
1720;;; older API 1720;;; older API
1721 1721
1722;;; (auth-source-user-or-password '("login" "password") "imap.myhost.com" t "tzz") 1722;; (auth-source-user-or-password '("login" "password") "imap.myhost.com" t "tzz")
1723 1723
1724;; deprecate the old interface 1724;; deprecate the old interface
1725(make-obsolete 'auth-source-user-or-password 1725(make-obsolete 'auth-source-user-or-password