emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog subr.el


From: Stefan Monnier
Subject: [Emacs-diffs] emacs/lisp ChangeLog subr.el
Date: Wed, 19 Aug 2009 19:42:28 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        09/08/19 19:42:28

Modified files:
        lisp           : ChangeLog subr.el 

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

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15975&r2=1.15976
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/subr.el?cvsroot=emacs&r1=1.644&r2=1.645

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15975
retrieving revision 1.15976
diff -u -b -r1.15975 -r1.15976
--- ChangeLog   19 Aug 2009 18:07:07 -0000      1.15975
+++ ChangeLog   19 Aug 2009 19:42:25 -0000      1.15976
@@ -1,5 +1,7 @@
 2009-08-19  Stefan Monnier  <address@hidden>
 
+       * 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: subr.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/subr.el,v
retrieving revision 1.644
retrieving revision 1.645
diff -u -b -r1.644 -r1.645
--- subr.el     19 Aug 2009 03:03:09 -0000      1.644
+++ subr.el     19 Aug 2009 19:42:28 -0000      1.645
@@ -1905,10 +1905,7 @@
        (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 @@
                   (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))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]