Next: Minibuffer Misc, Previous: Multiple Queries, Up: Minibuffers [Contents][Index]
To read a password to pass to another program, you can use the
function read-passwd
.
This function reads a password, prompting with prompt. It does not echo the password as the user types it; instead, it echoes ‘.’ for each character in the password.
The optional argument confirm, if non-nil
, says to read the
password twice and insist it must be the same both times. If it isn’t
the same, the user has to type it over and over until the last two
times match.
The optional argument default specifies the default password to
return if the user enters empty input. It is translated to ‘.’
and inserted in the minibuffer. If default is nil
, then
read-passwd
returns the null string in that case.
If non-nil
, swap the foreground and background colors of all faces while
reading a password. Default values is t
, unless feature
infodock
is provided.
This specifies the character echoed when typing a password. When nil
,
nothing is echoed.