]> git.eshelyaron.com Git - emacs.git/commitdiff
Update for the recent change
authorSam Steingold <sds@gnu.org>
Sun, 9 Jan 2022 22:36:38 +0000 (17:36 -0500)
committerSam Steingold <sds@gnu.org>
Tue, 11 Jan 2022 01:52:20 +0000 (20:52 -0500)
* doc/misc/auth.texi (Help for developers): Document
  'auth-source-pick-first-password' and 'auth-info-password'.
  Update the 'auth-source-search' example.

doc/misc/auth.texi

index b28ae247ea9bf88d2d58b39a786bbdc869df8ed6..c2a9aa44371e572d9462f847790daab80eefca08 100644 (file)
@@ -579,10 +579,7 @@ from Gnus's @code{nnimap.el}.
                                            :create t))))
     (if found
         (list (plist-get found :user)
-              (let ((secret (plist-get found :secret)))
-                (if (functionp secret)
-                    (funcall secret)
-                  secret))
+              (auth-info-password found)
               (plist-get found :save-function))
       nil)))
 @end example
@@ -602,7 +599,7 @@ Later, after a successful login, @code{nnimap.el} calls the
 
 @example
 (when (functionp (nth 2 credentials))
-   (funcall (nth 2 credentials)))
+  (funcall (nth 2 credentials)))
 @end example
 
 This will work whether the @code{:save-function} was provided or not.
@@ -637,6 +634,16 @@ This function forgets any cached data matching @var{spec}.
 It returns the number of items forgotten.
 @end defun
 
+@defun auth-source-pick-first-password &rest spec
+This function returns the password of the first record found by
+applying @code{auth-source-search} to @var{spec}.
+@end defun
+
+@defun auth-info-password auth-info
+This function extracts the password string from the @var{auth-info}
+record.
+@end defun
+
 @node GnuPG and EasyPG Assistant Configuration
 @appendix GnuPG and EasyPG Assistant Configuration