From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daiki Ueno Newsgroups: gmane.emacs.devel Subject: Re: Moving files from lisp/gnus/ to lisp/net/? Date: Sat, 10 Nov 2007 16:07:21 +0900 Message-ID: References: <87y7dd2e0f.fsf@mocca.josefsson.org> <54a15d860711060601s2d85f32o5942939270a7e59e@mail.gmail.com> <54a15d860711071646u2c200961y69e7d684c7418a7a@mail.gmail.com> <54a15d860711081633k364caf30r3b75464be8a060fa@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194678465 18336 80.91.229.12 (10 Nov 2007 07:07:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Nov 2007 07:07:45 +0000 (UTC) Cc: simon@josefsson.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 10 08:07:49 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IqkRY-00064d-Hn for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2007 08:07:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqkRM-0003Hn-NB for ged-emacs-devel@m.gmane.org; Sat, 10 Nov 2007 02:07:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IqkRI-0003He-JS for emacs-devel@gnu.org; Sat, 10 Nov 2007 02:07:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IqkRG-0003HR-UW for emacs-devel@gnu.org; Sat, 10 Nov 2007 02:07:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IqkRG-0003HO-Sj for emacs-devel@gnu.org; Sat, 10 Nov 2007 02:07:30 -0500 Original-Received: from g187018.scn-net.ne.jp ([202.83.187.18] helo=localhost) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IqkRC-0000s7-3X; Sat, 10 Nov 2007 02:07:26 -0500 Original-Received: from localhost ([127.0.0.1] helo=broken.deisui.org) by localhost with esmtp (Exim 4.68) (envelope-from ) id 1IqkR8-000189-Ay; Sat, 10 Nov 2007 16:07:22 +0900 In-Reply-To: (Daiki Ueno's message of "Sat, 10 Nov 2007 13:53:23 +0900") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82905 Archived-At: >>>>> In >>>>> Daiki Ueno wrote: > password.el itself is in lisp/gnus/. But we need a new function which > does password caching, whose arglist is similar to read-passwd's, and > whose name is longer than `read-passwd'. > What about this patch? Sorry for consecutive post but this might be better regarding argument order. Index: lisp/gnus/password.el =================================================================== RCS file: /sources/emacs/emacs/lisp/gnus/password.el,v retrieving revision 1.1 diff -c -r1.1 password.el *** lisp/gnus/password.el 28 Oct 2007 09:18:25 -0000 1.1 --- lisp/gnus/password.el 10 Nov 2007 07:03:14 -0000 *************** *** 134,139 **** --- 134,152 ---- (interactive) (fillarray password-data 0)) + ;;;###autoload + (defun read-passwd-through-cache (key prompt &optional confirm default) + "Read password associated with KEY in password cache. + This first looks up the cache by KEY. If it doesn't hit, this asks + user to input, and then adds it to the cache. The rest of arguments + PROMPT, CONFIRM, and DEFAULT are passed to `read-passwd'. + + To remove the password from the cache, `password-cache-remove'." + (or (password-read-from-cache key) + (let ((password (read-passwd prompt confirm default))) + (password-cache-add key password) + password))) + (provide 'password) ;;; arch-tag: ab160494-16c8-4c68-a4a1-73eebf6686e5 Regards, -- Daiki Ueno