summaryrefslogtreecommitdiff
path: root/lisp/net/netrc.el
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen <larsi@gnus.org>2010-09-26 13:25:35 +0000
committerKatsumi Yamaoka <yamaoka@jpl.org>2010-09-26 13:25:35 +0000
commit1821a7b49194ddf558746de5cf67bdc9217e9ebd (patch)
treeb3629b0d211032a2504ad188e130b043059aedad /lisp/net/netrc.el
parent2d04f304a2ab6b69d10feb88b398d62d3ab60474 (diff)
downloademacs-1821a7b49194ddf558746de5cf67bdc9217e9ebd.tar.gz
auth-source.el (auth-source-create): Query the user for whether to store the credentials.
auth-source.el: Require netrc. nnml.el (nnml-open-nov): Don't return dead buffers. gnus-picon.el (gnus-picon-xbm): Removed obsolete face. gnus-picon.el (gnus-picon-insert-glyph): Make the background white. gnus-art.el (gnus-treatment-function-alist): Insert picons after doing the header highlightling.
Diffstat (limited to 'lisp/net/netrc.el')
-rw-r--r--lisp/net/netrc.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/net/netrc.el b/lisp/net/netrc.el
index 2644659e20d..d76b8cf3a04 100644
--- a/lisp/net/netrc.el
+++ b/lisp/net/netrc.el
@@ -220,6 +220,17 @@ MODE can be \"login\" or \"password\", suitable for passing to
(eq type (car (cddr service)))))))
(cadr service)))
+(defun netrc-store-data (file host port user password)
+ (with-temp-buffer
+ (when (file-exists-p file)
+ (insert-file-contents file))
+ (goto-char (point-max))
+ (unless (bolp)
+ (insert "\n"))
+ (insert (format "machine %s login %s password %s port %s\n"
+ host user password port))
+ (write-region (point-min) (point-max) file nil 'silent)))
+
;;;###autoload
(defun netrc-credentials (machine &rest ports)
"Return a user name/password pair.