• Ted Zlatanov's avatar
    Merge changes made in Gnus trunk. · 733afdf4
    Ted Zlatanov authored
    auth-source.el (auth-source-read-char-choice): New function to read a character choice using `dropdown-list', `read-char-choice', or `read-char'.  It appends "[a/b/c] " to the prompt if the choices were '(?a ?b ?c).  The `dropdown-list' support is disabled for now.  Use `eval-when-compile' to load `dropdown-list'.
     (auth-source-netrc-saver): Use it.
    nnimap.el (nnimap-credentials): Keep the :save-function as the third parameter in the credentials.
     (nnimap-open-connection-1): Use it after a successful login.
     (nnimap-credentials): Add IMAP-specific user and password prompt.
    auth-source.el (auth-source-search): Add :require parameter, taking a list.  Document it and the :save-function return token.  Pass :require down.  Change the CREATED message from a warning to a debug statement.
     (auth-source-search-backends): Pass :require down.
     (auth-source-netrc-search): Pass :require down.
     (auth-source-netrc-parse): Use :require, if it's given, as a filter.  Change save prompt to indicate all modifications saved here are deletions.
     (auth-source-netrc-create): Take user login name as default in user prompt.  Move all the save functionality to a lexically bound function under the :save-function token in the returned list.  Set up clearer default prompts for user, host, port, and secret.
     (auth-source-netrc-saver): New function, intended to be wrapped for :save-function.
auth-source.el 57.4 KB