X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=views.lisp;h=3d87a7c7d1c3272b47c724d38dc75beb9cbfa90b;hb=8df04510a35e76a04399872d24ccdfa322a763ff;hp=2c2713e54079a34f850fac50dd68040ba18382ed;hpb=2272c8f3fad706bece472bc5a1909e3ea0cc53e3;p=hyperobject.git diff --git a/views.lisp b/views.lisp index 2c2713e..3d87a7c 100644 --- a/views.lisp +++ b/views.lisp @@ -7,10 +7,9 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Apr 2000 ;;;; -;;;; $Id: views.lisp,v 1.35 2003/05/14 04:45:05 kevin Exp $ -;;;; -;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg +;;;; $Id: views.lisp,v 1.39 2003/05/14 06:54:04 kevin Exp $ ;;;; +;;;; This file is Copyright (c) 2000-2003 by Kevin M. Rosenberg ;;;; ************************************************************************* (in-package :hyperobject) @@ -512,19 +511,28 @@ (defvar +newline-string+ (format nil "~%")) +(defun write-user-name-maybe-plural (obj nitems strm) + (write-string + (if (> nitems 1) + (hyperobject-class-user-name-plural obj) + (hyperobject-class-user-name obj)) + strm)) + (defun initialize-text-view (view) (setf (list-start-str-or-func view) (compile nil (eval '(lambda (obj nitems strm) - (format strm "~a~P:~%" - (hyperobject-class-user-name obj) nitems))))) + (write-user-name-maybe-plural obj nitems strm) + (write-char #\: strm) + (write-char #\Newline strm))))) (setf (list-start-indent view) t) (setf (obj-data-indent view) t) (setf (obj-data-end-str view) +newline-string+)) (defun html-list-start-func (obj nitems strm) - (format strm "

~a~p:

" strm) + (write-user-name-maybe-plural obj nitems strm) + (write-string ":