diff --git a/editor.lisp b/editor.lisp index 64e7234..ecb4ad3 100644 --- a/editor.lisp +++ b/editor.lisp @@ -64,19 +64,21 @@ (defvar *announced* nil) -(defun make-editor (&rest args) +(defun make-editor (&rest args &key quiet &allow-other-keys) (ti:set-terminal) (let* ((type (if (smart-terminal-p) 'smart-editor 'dumb-editor)) (spec (list *version* type))) - (unless (equal *announced* spec) - (format t "~&Linedit version ~A, ~A mode, ESC-h for help.~%" - *version* - (if (eq 'smart-editor type) - "smart" - "dumb")) - (setf *announced* spec)) + (unless quiet + (unless (equal *announced* spec) + (format t "~&Linedit version ~A, ~A mode, ESC-h for help.~%" + *version* + (if (eq 'smart-editor type) + "smart" + "dumb")) + (setf *announced* spec))) + (remf args :quiet) (apply 'make-instance type args))) ;;; undo diff --git a/main.lisp b/main.lisp index da3a789..253e3fe 100644 --- a/main.lisp +++ b/main.lisp @@ -23,7 +23,7 @@ (defvar *editor* nil) -(defun linedit (&rest keyword-args &key prompt history killring &allow-other-keys) +(defun linedit (&rest keyword-args &key prompt history killring quiet &allow-other-keys) "Reads a single line of input with line-editing from standard input of the process and returns it as a string. @@ -73,7 +73,7 @@ completion." (defvar *level* 0) -(defun formedit (&rest args &key (prompt1 "") (prompt2 "") history killring +(defun formedit (&rest args &key (prompt1 "") (prompt2 "") history killring quiet &allow-other-keys) "Reads a single form (s-expession) of input with line-editing from standard input of the process and returns it as a string.