1 (in-package :lisp-on-lines
)
3 (defmacro defline
(name (specializer &rest layers-and-combination-keywords
) &body docstring-and-body
)
6 (:compile-toplevel
:load-toplevel
:execute
)
7 (unless (fboundp (contextl::get-layered-function-definer-name name
))
8 `(define-layered-function ,name
(arg)
9 (:method-combination append
))))
10 (define-layered-method
12 ,@layers-and-combination-keywords
14 (or (third layers-and-combination-keywords
)
15 (and layers-and-combination-keywords
16 (null (cdr layers-and-combination-keywords
))))
19 ,(when (cdr docstring-and-body
)
20 (car docstring-and-body
))
22 ,(or (cdr docstring-and-body
) (car docstring-and-body
)))))
25 (defun line-out (component object
&key
(line #'line-in
) args
)
26 (apply #'display component object
(append args
(funcall line object
))))
28 (defmacro call-line
(from line
&rest args
)
29 (with-unique-names (lines object
)
30 `(multiple-value-bind (,lines
,object
)
32 (call-display-with-context ,from
,object nil
(append ,args
,lines
)))))