Mercurial > emacs
comparison lisp/subr.el @ 37028:f023c8a482ec
(read-passwd): Clear command history after each
character entered. From: Stephen Gildea <gildea@alum.mit.edu>.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Wed, 28 Mar 2001 09:28:15 +0000 |
parents | 80a057b7576b |
children | dec182bcbaa4 |
comparison
equal
deleted
inserted
replaced
37027:9de32dc27d45 | 37028:f023c8a482ec |
---|---|
921 (while (progn (message "%s%s" | 921 (while (progn (message "%s%s" |
922 prompt | 922 prompt |
923 (make-string (length pass) ?.)) | 923 (make-string (length pass) ?.)) |
924 (setq c (read-char-exclusive nil t)) | 924 (setq c (read-char-exclusive nil t)) |
925 (and (/= c ?\r) (/= c ?\n) (/= c ?\e))) | 925 (and (/= c ?\r) (/= c ?\n) (/= c ?\e))) |
926 (clear-this-command-keys) | |
926 (if (= c ?\C-u) | 927 (if (= c ?\C-u) |
927 (progn | 928 (progn |
928 (and (arrayp pass) (fillarray pass ?\0)) | 929 (and (arrayp pass) (fillarray pass ?\0)) |
929 (setq pass "")) | 930 (setq pass "")) |
930 (if (and (/= c ?\b) (/= c ?\177)) | 931 (if (and (/= c ?\b) (/= c ?\177)) |
936 (setq pass new-pass)) | 937 (setq pass new-pass)) |
937 (if (> (length pass) 0) | 938 (if (> (length pass) 0) |
938 (let ((new-pass (substring pass 0 -1))) | 939 (let ((new-pass (substring pass 0 -1))) |
939 (and (arrayp pass) (fillarray pass ?\0)) | 940 (and (arrayp pass) (fillarray pass ?\0)) |
940 (setq pass new-pass)))))) | 941 (setq pass new-pass)))))) |
941 (clear-this-command-keys) | |
942 (message nil) | 942 (message nil) |
943 (or pass default "")))) | 943 (or pass default "")))) |
944 | 944 |
945 (defun force-mode-line-update (&optional all) | 945 (defun force-mode-line-update (&optional all) |
946 "Force the mode-line of the current buffer to be redisplayed. | 946 "Force the mode-line of the current buffer to be redisplayed. |