X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/0386c736fe19db9f72a9d12728f5707cf570778f..f9b119564f7d0c0d352fa1b13be5ef5b5fb8b872:/src/lines.lisp diff --git a/src/lines.lisp b/src/lines.lisp index 8b26923..55763dd 100644 --- a/src/lines.lisp +++ b/src/lines.lisp @@ -1,12 +1,12 @@ (in-package :lisp-on-lines) +(define-layered-function line-in (name) + (:method-combination append) + (:method append (thing) + '())) + (defmacro defline (name (specializer &rest layers-and-combination-keywords) &body docstring-and-body) `(progn - ,(eval-when - (:compile-toplevel :load-toplevel :execute) - (unless (fboundp (contextl::get-layered-function-definer-name name)) - `(define-layered-function ,name (arg) - (:method-combination append)))) (define-layered-method ,name ,@layers-and-combination-keywords @@ -21,16 +21,4 @@ ,(or (cdr docstring-and-body) (car docstring-and-body))))) -(defun line-out (component object &rest args &key (line #'line-in) &allow-other-keys ) - (apply #'display component object (append args (funcall line object)))) - -(defline line-in (thing) - '()) - - -(defmacro call-line (from line &rest args) - (with-unique-names (lines object) - `(multiple-value-bind (,lines ,object) - (funcall ,line) - (call-display-with-context ,from ,object nil (append ,args ,lines)))))