X-Git-Url: https://git.hcoop.net/clinton/lisp-on-lines.git/blobdiff_plain/a4e6154d961ff4b606aa534bd4e1570565cab351..e9c163726f466dee83a8dbe7d952f6aaff4345b6:/src/lines.lisp diff --git a/src/lines.lisp b/src/lines.lisp index 209271f..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 @@ -22,12 +22,3 @@ ,(or (cdr docstring-and-body) (car docstring-and-body))))) -(defun line-out (component object &key (line #'line-in) args) - (apply #'display component object (append args (funcall line object)))) - -(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))))) -