diff options
| author | Teodor Zlatanov | 2011-03-13 04:07:38 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2011-03-13 04:07:38 +0000 |
| commit | 4248cca2de96a6732a233e9c1d13c6336b215705 (patch) | |
| tree | 808e2d99401ed0d77cbe21a9815a35b62988946f /doc | |
| parent | 8d9101d850b5ad006ce41a231f294ea6de93986a (diff) | |
| download | emacs-4248cca2de96a6732a233e9c1d13c6336b215705.tar.gz emacs-4248cca2de96a6732a233e9c1d13c6336b215705.zip | |
Merge changes made in Gnus trunk.
auth.texi (Help for developers): Update docs to explain that the :save-function will only run the first time.
auth-source.el (auth-source-format-prompt): Always convert the value to a string to avoid evaluating non-string arguments.
(auth-source-netrc-create): Offer default properly, not as initial content in `read-string'.
(auth-source-netrc-saver): Use a cache keyed by file name and MD5 hash of line to determine if we've been run before. If so, don't run again, but print a trivial message to indicate the cache was hit instead.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/auth.texi | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 1a1ca1d6296..db3a944c160 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-03-12 Teodor Zlatanov <tzz@lifelogs.com> | ||
| 2 | |||
| 3 | * auth.texi (Help for developers): Update docs to explain that the | ||
| 4 | :save-function will only run the first time. | ||
| 5 | |||
| 1 | 2011-03-12 Glenn Morris <rgm@gnu.org> | 6 | 2011-03-12 Glenn Morris <rgm@gnu.org> |
| 2 | 7 | ||
| 3 | * Makefile.in (emacs-faq.html): Fix some more cross-refs. | 8 | * Makefile.in (emacs-faq.html): Fix some more cross-refs. |
diff --git a/doc/misc/auth.texi b/doc/misc/auth.texi index 85a3f098131..a16da92343e 100644 --- a/doc/misc/auth.texi +++ b/doc/misc/auth.texi | |||
| @@ -289,11 +289,21 @@ Later, after a successful login, @code{nnimal.el} calls the | |||
| 289 | (funcall (nth 2 credentials))) | 289 | (funcall (nth 2 credentials))) |
| 290 | @end example | 290 | @end example |
| 291 | 291 | ||
| 292 | Which will work whether the @code{:save-function} was provided or not. | 292 | This will work whether the @code{:save-function} was provided or not. |
| 293 | @code{:save-function} will be provided only when a new entry was | 293 | @code{:save-function} will be provided only when a new entry was |
| 294 | created, so this effectively says ``after a successful login, save the | 294 | created, so this effectively says ``after a successful login, save the |
| 295 | authentication information we just used, if it was newly created.'' | 295 | authentication information we just used, if it was newly created.'' |
| 296 | 296 | ||
| 297 | After the first time it's called, the @code{:save-function} will not | ||
| 298 | run again (but it will log something if you have set | ||
| 299 | @code{auth-source-debug} to @code{'trivia}). This is so it won't ask | ||
| 300 | the same question again, which is annoying. This is so it won't ask | ||
| 301 | the same question again, which is annoying. This is so it won't ask | ||
| 302 | the same question again, which is annoying. | ||
| 303 | |||
| 304 | So the responsibility of the API user that specified @code{:create t} | ||
| 305 | is to call the @code{:save-function} if it's provided. | ||
| 306 | |||
| 297 | @defun auth-source-delete SPEC | 307 | @defun auth-source-delete SPEC |
| 298 | 308 | ||
| 299 | TODO: how to include docstring? | 309 | TODO: how to include docstring? |