Mercurial > emacs
comparison lisp/comint.el @ 16409:258a28c21b74
(comint-read-noecho): Clear out the intermediate strings.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 08 Oct 1996 23:00:54 +0000 |
parents | 9e94b5fdaab1 |
children | 06f92ef2857c |
comparison
equal
deleted
inserted
replaced
16408:87f15c601f5a | 16409:258a28c21b74 |
---|---|
1394 RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g aborts (if | 1394 RET, LFD, or ESC. DEL or C-h rubs out. C-u kills line. C-g aborts (if |
1395 `inhibit-quit' is set because e.g. this function was called from a process | 1395 `inhibit-quit' is set because e.g. this function was called from a process |
1396 filter and C-g is pressed, this function returns nil rather than a string). | 1396 filter and C-g is pressed, this function returns nil rather than a string). |
1397 | 1397 |
1398 Note that the keystrokes comprising the text can still be recovered | 1398 Note that the keystrokes comprising the text can still be recovered |
1399 \(temporarily) with \\[view-lossage]. This may be a security bug for some | 1399 \(temporarily) with \\[view-lossage]. Some people find this worrysome. |
1400 applications." | 1400 Once the caller uses the password, it can erase the password |
1401 by doing (fillarray STRING 0)." | |
1401 (let ((ans "") | 1402 (let ((ans "") |
1403 (newans nil) | |
1402 (c 0) | 1404 (c 0) |
1403 (echo-keystrokes 0) | 1405 (echo-keystrokes 0) |
1404 (cursor-in-echo-area t) | 1406 (cursor-in-echo-area t) |
1405 (message-log-max nil) | 1407 (message-log-max nil) |
1406 (done nil)) | 1408 (done nil)) |
1421 (setq quit-flag t | 1423 (setq quit-flag t |
1422 done t)) | 1424 done t)) |
1423 ((or (= c ?\r) (= c ?\n) (= c ?\e)) | 1425 ((or (= c ?\r) (= c ?\n) (= c ?\e)) |
1424 (setq done t)) | 1426 (setq done t)) |
1425 ((= c ?\C-u) | 1427 ((= c ?\C-u) |
1428 (fillarray ans 0) | |
1426 (setq ans "")) | 1429 (setq ans "")) |
1427 ((and (/= c ?\b) (/= c ?\177)) | 1430 ((and (/= c ?\b) (/= c ?\177)) |
1428 (setq ans (concat ans (char-to-string c)))) | 1431 (setq newans (concat ans (char-to-string c))) |
1432 (fillarray ans 0) | |
1433 (setq ans newans)) | |
1429 ((> (length ans) 0) | 1434 ((> (length ans) 0) |
1435 (aset ans (1- (length ans)) 0) | |
1430 (setq ans (substring ans 0 -1))))) | 1436 (setq ans (substring ans 0 -1))))) |
1431 (if quit-flag | 1437 (if quit-flag |
1432 ;; Emulate a true quit, except that we have to return a value. | 1438 ;; Emulate a true quit, except that we have to return a value. |
1433 (prog1 | 1439 (prog1 |
1434 (setq quit-flag nil) | 1440 (setq quit-flag nil) |