1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-19 18:13:55 +00:00

(read-passwd): Use read-key so keypad keys work as well.

This commit is contained in:
Stefan Monnier 2009-08-19 19:42:25 +00:00
parent b3d8e4a025
commit 4fd15622e6
2 changed files with 4 additions and 4 deletions

View File

@ -1,5 +1,7 @@
2009-08-19 Stefan Monnier <monnier@iro.umontreal.ca>
* subr.el (read-passwd): Use read-key so keypad keys work as well.
* help.el (help-print-return-message): Rename from
print-help-return-message.

View File

@ -1905,10 +1905,7 @@ by doing (clear-string STRING)."
(while (progn (message "%s%s"
prompt
(make-string (length pass) ?.))
;; We used to use read-char-exclusive, but that
;; gives funny behavior when the user presses,
;; e.g., the arrow keys.
(setq c (read-event nil t))
(setq c (read-key))
(not (memq c stop-keys)))
(clear-this-command-keys)
(cond ((memq c rubout-keys) ; rubout
@ -1916,6 +1913,7 @@ by doing (clear-string STRING)."
(let ((new-pass (substring pass 0 -1)))
(and (arrayp pass) (clear-string pass))
(setq pass new-pass))))
((eq c ?\C-g) (keyboard-quit))
((not (numberp c)))
((= c ?\C-u) ; kill line
(and (arrayp pass) (clear-string pass))