diff options
| author | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
|---|---|---|
| committer | Vibhav Pant | 2020-08-21 14:04:35 +0530 |
| commit | f0f8d7b82492e741950c363a03b886965c91b1b0 (patch) | |
| tree | 19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/password-cache.el | |
| parent | 9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff) | |
| parent | c818c29771d3cb51875643b2f6c894073e429dd2 (diff) | |
| download | emacs-feature/native-comp-macos-fixes.tar.gz emacs-feature/native-comp-macos-fixes.zip | |
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/password-cache.el')
| -rw-r--r-- | lisp/password-cache.el | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/lisp/password-cache.el b/lisp/password-cache.el index f5007579a8a..2443f374a84 100644 --- a/lisp/password-cache.el +++ b/lisp/password-cache.el | |||
| @@ -94,22 +94,6 @@ The variable `password-cache' control whether the cache is used." | |||
| 94 | (or (password-read-from-cache key) | 94 | (or (password-read-from-cache key) |
| 95 | (read-passwd prompt))) | 95 | (read-passwd prompt))) |
| 96 | 96 | ||
| 97 | (defun password-read-and-add (prompt &optional key) | ||
| 98 | "Read password, for use with KEY, from user, or from cache if wanted. | ||
| 99 | Then store the password in the cache. Uses `password-read' and | ||
| 100 | `password-cache-add'. Custom variables `password-cache' and | ||
| 101 | `password-cache-expiry' regulate cache behavior. | ||
| 102 | |||
| 103 | Warning: the password is cached without checking that it is | ||
| 104 | correct. It is better to check the password before caching. If | ||
| 105 | you must use this function, take care to check passwords and | ||
| 106 | remove incorrect ones from the cache." | ||
| 107 | (declare (obsolete password-read "23.1")) | ||
| 108 | (let ((password (password-read prompt key))) | ||
| 109 | (when (and password key) | ||
| 110 | (password-cache-add key password)) | ||
| 111 | password)) | ||
| 112 | |||
| 113 | (defun password-cache-remove (key) | 97 | (defun password-cache-remove (key) |
| 114 | "Remove password indexed by KEY from password cache. | 98 | "Remove password indexed by KEY from password cache. |
| 115 | This is typically run by a timer setup from `password-cache-add', | 99 | This is typically run by a timer setup from `password-cache-add', |