* erc.el (erc-open): Use `auth-source' for password retrieval when
possible.
+2012-06-15 Julien Danjou <julien@danjou.info>
+
+ * erc.el (erc-open): Use `auth-source' for password retrieval when
+ possible.
+
2012-06-12 Chong Yidong <cyd@gnu.org>
* erc-dcc.el (erc-dcc-chat-filter-functions): Rename from
(require 'font-lock)
(require 'pp)
(require 'thingatpt)
+(require 'auth-source)
(require 'erc-compat)
(defvar erc-official-location
;; The local copy of `erc-nick' - the list of nicks to choose
(setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick)))
;; password stuff
- (setq erc-session-password passwd)
+ (setq erc-session-password (or passwd
+ (let ((secret
+ (plist-get
+ (nth 0
+ (auth-source-search :host server
+ :max 1
+ :user nick
+ :port port
+ :require '(:secret)))
+ :secret)))
+ (if (functionp secret)
+ (funcall secret)
+ secret))))
;; debug output buffer
(setq erc-dbuf
(when erc-log-p