]> git.eshelyaron.com Git - emacs.git/commitdiff
(read-passwd): Use read-key so keypad keys work as well.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Aug 2009 19:42:25 +0000 (19:42 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 19 Aug 2009 19:42:25 +0000 (19:42 +0000)
lisp/ChangeLog
lisp/subr.el

index 584cef201923528485d938fd279b4c12bb10802f..d8ffb2e91694cf9715279c01101b8ae06ac5ae42 100644 (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.
 
index 668b323fbc0972db27e219ec7901eeb69a99ce83..f2709f3b7776fa7827daff665df08a93c853d7e7 100644 (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))