From 063375e0ed6a9e06c002744384686defeebd0bf2 Mon Sep 17 00:00:00 2001 From: Sam Steingold Date: Sun, 9 Jan 2022 17:36:38 -0500 Subject: [PATCH] Update for the recent change * 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 | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index b28ae247ea9..c2a9aa44371 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi @@ -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 -- 2.39.5