[Top][All Lists]
[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 13:53:23 +0900 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
>>>>> In <address@hidden>
>>>>> Richard Stallman <address@hidden> wrote:
> So you're saying he would turn on caching without realizing it?
Yes.
> That says "give shorter names to frequently used functions, longer
> names to rarely used functions". My suggestion is based on the fact
> that I hope that password caching in elisp will not be used frequently
> Ok, you have convinced me. Let's make it a separate function.
> With that decision made, is the code ready to install?
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?
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 04:47:16 -0000
***************
*** 134,139 ****
--- 134,152 ----
(interactive)
(fillarray password-data 0))
+ ;;;###autoload
+ (defun read-passwd-through-cache (prompt key &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'.
+
+ The variable `password-cache' control whether the cache is used."
+ (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
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/02
- Re: Moving files from lisp/gnus/ to lisp/net/?, Simon Josefsson, 2007/11/05
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/06
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/06
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/07
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/07
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/08
- Message not available
- Fwd: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/09
- Message not available
- Message not available
- Re: Moving files from lisp/gnus/ to lisp/net/?,
Daiki Ueno <=
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/10
- Re: Moving files from lisp/gnus/ to lisp/net/?, Stefan Monnier, 2007/11/10
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/10
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/11
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/12
- Re: Moving files from lisp/gnus/ to lisp/net/?, Richard Stallman, 2007/11/13
- Re: Moving files from lisp/gnus/ to lisp/net/?, Daiki Ueno, 2007/11/13
- Re: Moving files from lisp/gnus/ to lisp/net/?, Michael Albinus, 2007/11/14
- Re: Moving files from lisp/gnus/ to lisp/net/?, Stefan Monnier, 2007/11/14
- Re: Moving files from lisp/gnus/ to lisp/net/?, Michael Albinus, 2007/11/14