modified dev-lisp/linedit