mirror of
https://github.com/samsonjs/elisp.js.git
synced 2026-03-25 09:15:49 +00:00
add a hide-prompt function
This commit is contained in:
parent
39a5b52e15
commit
f87cfe33d2
2 changed files with 7 additions and 1 deletions
|
|
@ -123,5 +123,9 @@ EL.definePrimitive('print', ['x'],
|
|||
return EL.nil;
|
||||
},
|
||||
"print an expression");
|
||||
|
||||
EL.definePrimitive('hide-prompt', ['yes-or-no'],
|
||||
function(bool){ EL.hidePrompt = !EL.isNil(bool); },
|
||||
"Call with T to hide the prompt or nil to show it.");
|
||||
};
|
||||
EL.initHook(EL._definePrimitives);
|
||||
|
|
@ -31,7 +31,9 @@ EL.repl = function() {
|
|||
var p = new EL.Parser(),
|
||||
e = new EL.Evaluator();
|
||||
while (true) {
|
||||
print("elisp> "); // i don't want a newline, grrrr
|
||||
if (!EL.hidePrompt) {
|
||||
print("elisp> "); // i don't want a newline, grrrr
|
||||
}
|
||||
try {
|
||||
var line = readline();
|
||||
while (!line) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue