help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to customize `read-passwd' [was: Setting mark in minibuffer prompt]


From: Drew Adams
Subject: how to customize `read-passwd' [was: Setting mark in minibuffer prompt]
Date: Sun, 8 Jul 2012 11:07:05 -0700

> I am enclosing a related question I asked almost exactly
> two years ago in case the answer is equally simple

Please, in general, start a new thread for a new question.

> If I type (read-string "Prompt: ") I can line edit the typein with
> <crtl-a>, <ctrl-b>, <ctrl-k>, etc.  If I type (read-passwd "Prompt: ")
> the only characters that are not merely absorbed into the string are
> <ctrl-u> and either of the delete-backwards characters.

> Does anyone know how to get the cursor to come out in the
> right place as I back up down the row of dots that
> read-passwd echoes?

What I advise is to look at the code defining `read-passwd', and define your
function similarly.

What you see there is that `read-key' is called and each key that is read is
handled with a case analysis.  What you want is to add another case (or cases).
See how that code currently handles special lists of keys: `stop-keys' and
`rubout-keys'.  More pertinent perhaps is the treatment of `C-y'.

HTH.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]