diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/acdw.el | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index f23ca0e..796c2f1 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el | |||
@@ -579,7 +579,18 @@ It's called 'require-private' for historical reasons." | |||
579 | (switch-to-buffer nil) | 579 | (switch-to-buffer nil) |
580 | (other-window (or arg 1)))) | 580 | (other-window (or arg 1)))) |
581 | 581 | ||
582 | 582 | ||
583 | ;;; Auth-sources | ||
584 | ;; https://github.com/emacs-circe/circe/wiki/Configuration | ||
585 | (defun acdw/fetch-password (&rest params) | ||
586 | (require 'auth-source) | ||
587 | (let ((match (car (apply #'auth-source-search params)))) | ||
588 | (if match | ||
589 | (let ((secret (plist-get match :secret))) | ||
590 | (if (functionp secret) | ||
591 | (funcall secret) | ||
592 | secret)) | ||
593 | (warn "Password not found for %S" params)))) | ||
583 | 594 | ||
584 | (provide 'acdw) | 595 | (provide 'acdw) |
585 | ;;; acdw.el ends here | 596 | ;;; acdw.el ends here |