emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving files from lisp/gnus/ to lisp/net/?


From: Daiki Ueno
Subject: Re: Moving files from lisp/gnus/ to lisp/net/?
Date: Sat, 10 Nov 2007 16:07:21 +0900
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux)

>>>>> In <address@hidden> 
>>>>>   Daiki Ueno <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]