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.
(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
(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))