Commit 4fd15622 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

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

parent b3d8e4a0
2009-08-19 Stefan Monnier <>
* subr.el (read-passwd): Use read-key so keypad keys work as well.
* help.el (help-print-return-message): Rename from
......@@ -1905,10 +1905,7 @@ by doing (clear-string STRING)."
(while (progn (message "%s%s"
(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)))
(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))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment