comparison lisp/net/netrc.el @ 110586:867180d035b0

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.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 26 Sep 2010 13:25:35 +0000
parents b3141c4861e2
children 3b9bd3888ee9
comparison
equal deleted inserted replaced
110585:677b6dea1d61 110586:867180d035b0
218 (while (and (setq service (pop services)) 218 (while (and (setq service (pop services))
219 (not (and (string= name (car service)) 219 (not (and (string= name (car service))
220 (eq type (car (cddr service))))))) 220 (eq type (car (cddr service)))))))
221 (cadr service))) 221 (cadr service)))
222 222
223 (defun netrc-store-data (file host port user password)
224 (with-temp-buffer
225 (when (file-exists-p file)
226 (insert-file-contents file))
227 (goto-char (point-max))
228 (unless (bolp)
229 (insert "\n"))
230 (insert (format "machine %s login %s password %s port %s\n"
231 host user password port))
232 (write-region (point-min) (point-max) file nil 'silent)))
233
223 ;;;###autoload 234 ;;;###autoload
224 (defun netrc-credentials (machine &rest ports) 235 (defun netrc-credentials (machine &rest ports)
225 "Return a user name/password pair. 236 "Return a user name/password pair.
226 Port specifications will be prioritised in the order they are 237 Port specifications will be prioritised in the order they are
227 listed in the PORTS list." 238 listed in the PORTS list."