Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!lll-tis!ptsfa!ihnp4!inuxc!pur-ee!j.cc.purdue.edu!mit-prep!phr From: phr@mit-prep.ARPA (Paul Rubin) Newsgroups: comp.emacs Subject: Re: Re: reading without echo... Message-ID: <99@mit-prep.ARPA> Date: Thu, 14-May-87 13:07:23 EDT Article-I.D.: mit-prep.99 Posted: Thu May 14 13:07:23 1987 Date-Received: Sat, 23-May-87 16:21:09 EDT References: <188@scampi.UUCP> <94@hotlg.ATT> Distribution: na Organization: The MIT AI Lab, Cambridge, MA Lines: 19 > I wrote a small package that used such a thing a while ago, but > RMS declined to include it in the 18.4x distribution. I could not find > a way to accomplish the read purely in Elisp, so I did it in C. ... Here is a simple Lisp function that does it. Enough already, ok? (defun read-string-no-echo (prompt) "Read string from tty, prompting with PROMPT, not echoing chars." (let ((c 0) (str "")) (message prompt) (while (/= c ?\r) (setq c (read-char)) (message prompt) (if (/= c ?\r) (setq str (concat str (char-to-string c))))) (message "") str))