branch: externals/auth-source-xoauth2-plugin
commit 5084327a3420a3a623d5e747b023a9cef8d4029b
Author: Xiyue Deng <[email protected]>
Commit: Xiyue Deng <[email protected]>
Use `push' instead of `add-to-list'
* `add-to-list' should not refer to a lexical variable.
* Push also avoids duplication check.
(Based on review at
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=72992#14. Thanks Philip
Kaludercic for the review and suggestions!)
---
auth-source-xoauth2-plugin.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/auth-source-xoauth2-plugin.el b/auth-source-xoauth2-plugin.el
index 42530ec108..a09422e627 100644
--- a/auth-source-xoauth2-plugin.el
+++ b/auth-source-xoauth2-plugin.el
@@ -123,14 +123,14 @@ set along `host', `user', and `port' (note the
snake_case)."
(unless (and check-secret
(not (plist-get auth-data :secret)))
(auth-source-do-debug "Updating auth-source-search results.")
- (add-to-list 'res auth-data t)))
+ (push 'res auth-data)))
res)))
;;;###autoload
(defun auth-source-xoauth2-plugin-enable ()
"Enable auth-source-xoauth2-plugin."
(unless (memq 'xoauth2 smtpmail-auth-supported)
- (add-to-list 'smtpmail-auth-supported 'xoauth2))
+ (push 'smtpmail-auth-supported 'xoauth2))
(advice-add 'auth-source-search-backends :around
#'auth-source-xoauth2-plugin--search-backends))