Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site burdvax.UUCP Path: utzoo!linus!decvax!genrad!grkermit!masscomp!clyde!akgua!psuvax!burdvax!hdj From: hdj@burdvax.UUCP Newsgroups: net.emacs Subject: lock.ml Message-ID: <1479@burdvax.UUCP> Date: Sat, 18-Feb-84 11:34:02 EST Article-I.D.: burdvax.1479 Posted: Sat Feb 18 11:34:02 1984 Date-Received: Sun, 19-Feb-84 05:46:51 EST Organization: System Development Corporation, Paoli PA Lines: 36 = lock.ml is an Emacs package that simulates the "lock" program. lock.ml asks for a password (twice); your Emacs job is "locked" until the password is repeated. Any background processes you might be running are not affected. lock.ml was written by Karl Puder (decwrl!rhea!logic!puder). Thanks, Karl. ;------------------ lock.ml --------------------- ; Note that when attempting to escape from LOCK, only a RETURN (13) will end ; lock-tty-string. (defun (lock key (progn (setq key (lock-tty-string "Key:")) (if (= key (lock-tty-string "Again:")) (while (!= key (lock-tty-string "LOCK")) (message "Wrong") (sit-for 10)) (error-message "Keys differed")) (message "Exited lock.") ) ) (lock-tty-string chars char (setq chars "") (message (arg 1)) (while (!= 13 (setq char (get-tty-character))) (message (arg 1)) (setq chars (concat chars (char-to-string char)))) chars ) ) ; ----- that's all folks!