diff options
author | Stefan Monnier <[email protected]> | 2009-08-19 19:42:25 +0000 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2009-08-19 19:42:25 +0000 |
commit | 4fd15622e64cceb41dab27e0ffcfdcb8c4090861 (patch) | |
tree | 7f492748c0ad3a6c2a036db7eb53cbf8d87ec50f | |
parent | b3d8e4a025ffb5d45d744f96f9a1d4dcb5988ee1 (diff) |
(read-passwd): Use read-key so keypad keys work as well.
-rw-r--r-- | lisp/ChangeLog | 2 | ||||
-rw-r--r-- | lisp/subr.el | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 584cef2019..d8ffb2e916 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2009-08-19 Stefan Monnier <[email protected]> + * 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. diff --git a/lisp/subr.el b/lisp/subr.el index 668b323fbc..f2709f3b77 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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)) |