From f65abc031ee9c0c3b73bfd859fdcd3f4f43e9fb8 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 21 Jul 1997 04:37:33 +0000 Subject: [PATCH] Add optional argument to KEYBOARD-READ which, if true, says that the key being read should not be recorded in the keyboard history. This option is used to prevent passwords from being stored in the history. --- v7/src/edwin/input.scm | 9 +++++---- v7/src/edwin/prompt.scm | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/v7/src/edwin/input.scm b/v7/src/edwin/input.scm index b914f79e3..50b9cae9a 100644 --- a/v7/src/edwin/input.scm +++ b/v7/src/edwin/input.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: input.scm,v 1.98 1993/08/20 00:14:28 cph Exp $ +;;; $Id: input.scm,v 1.99 1997/07/21 04:37:20 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-93 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -180,7 +180,7 @@ B 3BAB8C (keyboard-macro-peek-key) (keyboard-read-1 (editor-peek current-editor) #t))) -(define (keyboard-read) +(define (keyboard-read #!optional no-save?) (set! keyboard-keys-read (+ keyboard-keys-read 1)) (if *executing-keyboard-macro?* (keyboard-macro-read-key) @@ -188,7 +188,8 @@ B 3BAB8C (cond ((key? key) (set! auto-save-keystroke-count (fix:+ auto-save-keystroke-count 1)) - (ring-push! (current-char-history) key) + (if (not (and (not (default-object? no-save?)) no-save?)) + (ring-push! (current-char-history) key)) (if *defining-keyboard-macro?* (keyboard-macro-write-key key))) (*defining-keyboard-macro?* ((ref-command end-kbd-macro) 1))) diff --git a/v7/src/edwin/prompt.scm b/v7/src/edwin/prompt.scm index b996e1c2b..fd1904a22 100644 --- a/v7/src/edwin/prompt.scm +++ b/v7/src/edwin/prompt.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: prompt.scm,v 1.168 1996/05/11 08:44:56 cph Exp $ +;;; $Id: prompt.scm,v 1.169 1997/07/21 04:37:33 cph Exp $ ;;; -;;; Copyright (c) 1986, 1989-96 Massachusetts Institute of Technology +;;; Copyright (c) 1986, 1989-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -852,7 +852,7 @@ Whilst editing the command, the following commands are available: #f (lambda () (let loop ((ts "")) - (let ((input (keyboard-read))) + (let ((input (keyboard-read #t))) (cond ((input-event? input) (abort-typein-edit input)) ((not (and (char? input) (char-ascii? input))) -- 2.25.1