netrc caching and better searching.
authorTed Zlatanov <tzz@lifelogs.com>
Tue, 22 Feb 2011 20:51:39 +0000 (14:51 -0600)
committerTed Zlatanov <tzz@lifelogs.com>
Tue, 22 Feb 2011 20:51:39 +0000 (14:51 -0600)
commitbc054122cc372e8aac70bf53c18e82789dc2f82e
treec4c455976df970109a7741939b93e5469807b578
parent5d8afc874441acee6946b8d1e5534648c6b29cab
netrc caching and better searching.

* auth-source.el: Don't load netrc.el.
(auth-source-debug): Add 'trivia option for extra output.
(auth-source-do-trivia): Use it.
(auth-source-search): Simplify logic to use
`auth-source-search-backends'.  Use `auth-source-do-trivia' where
appropriate.  Don't keep a running count at this level.  Layer :create
and :delete options appropriately on the first and second passes.
Don't track the backend with the search results.
(auth-source-search-backends): New function to search a list of
backends for a processed spec.
(auth-source-netrc-parse): Cache all netrc files, making
auth-source-netrc-cache an alist keyed by the file name and using the
file mtime as the caching criterion.  Keep the obfuscated data secret
with a lexical bind.
(auth-source-netrc-search): Don't calculate the length of the results
unnecessarily.
lisp/ChangeLog
lisp/auth-source.el