Commit d21b35bf authored by Dave Cooper's avatar Dave Cooper

updating tutorial manual

parent 4e5ed329
......@@ -29,6 +29,7 @@
(defparameter *index-hash* nil)
(defparameter *debug-index* nil)
(define-lens (html-format assembly) ()
......@@ -53,15 +54,21 @@
(:html (:head (:title (str (the title)))
((:link :href (the style-url) :rel "stylesheet" :type "text/css")))
(let ((*index-hash* (make-hash-table :test #'equalp)))
(:body (:div (write-the cl-who-contents-out))
(:div (write-the cl-who-base))
(:div (write-the cl-who-index)))))))
(:body (:div (write-the cl-who-contents-out))
(:div (write-the cl-who-base))
(:div (write-the cl-who-index))))))))
;; FLAG -- fill in! If you access *index-hash* from here, it will
;; be the dynamically bound one.
(with-cl-who ()
(:p (:h2 "Index"))
(let* ((index-plist (list-hash *index-hash*))
(keys (sort (plist-keys index-plist) #'string-lessp)))
(htm (:ul
(dolist (key keys)
(dolist (target (gethash key *index-hash*))
(htm (:li ((:a :href (format nil "#~a" target)) (str key)))))))))))
......@@ -180,10 +187,18 @@
(write-the-object element cl-who-base)))))
(:quote (print-variables (the markup-tag) (the elements))
(htm (:blockquote (dolist (element (list-elements (the elements)))
(:quote (htm (:blockquote (dolist (element (list-elements (the elements)))
(write-the-object element cl-who-base)))))
(:index (dolist (element (list-elements (the elements)))
(let* ((data (the-object element data))
(anchor-tag (string (gensym)))
(current (gethash data *index-hash*)))
(if current (pushnew anchor-tag current)
(setf (gethash data *index-hash*) (list anchor-tag)))
(htm ((:a :name anchor-tag))
(write-the-object element cl-who-base)))))
(otherwise (when *warn-on-unrecognized-tags?*
(warn "Markup tag ~s was not recognized~%" (the markup-tag))))
......@@ -315,28 +315,7 @@ loaderImg: '/static/gwl/tasty-unpix/loader.gif',loaderText: 'Narrowing Down...'}
(mapcar #'(lambda(child)
(the-object child dom-subsections))
(the children))
(html (:html
(the default-header-content)
(:title "The " (:princ (the strings-for-display-verbose)) " Package"))
(when *developing?* (html (:p (the (write-development-links)))))
(:p (the (:write-back-link :display-string "Documentation Home")))
(:center (:h2 (:princ (the :title)))
(when (package-nicknames (the :package-key))
(html (:i
(format *html-stream* "a.k.a. ~{~:(~a~)~^, ~}"
(package-nicknames (the :package-key)))))))
(mapc #'(lambda (child)
(the-object child (:write-documentation-links)))
(the :children)))
(:p (the (:write-back-link :display-string "Documentation Home")))
(:p (the :write-footer))))))
(the children)))
("Void. Prints to *html-stream* a bulleted list for each of the three categories of docs in the package."
......@@ -281,7 +281,7 @@ If you specify :part-symbol-supplied, do not specify :instance-supplied."))
(with-input-from-string (ss (the example-code))
(let ((*package* (find-package (second (read ss)))))
(intern (symbol-name (second (read ss))) *package*)))
(vrml-view :type (if (the show-vrml?) 'web-drawing 'null-part)
;;:view-default (getf (the instance %renderer-info%) :view-default :trimetric)
......@@ -66,7 +66,11 @@
((strings-for-display (format nil "~a" (the symbol)))
(doc-string (glisp:function-documentation (the symbol)))
(macro? (macro-function (the symbol))))
(macro? (macro-function (the symbol)))
(dom-body (progn (print-variables (the root-path)) `((:p ,(format nil "~a" (the section-plist))))))
......@@ -111,9 +111,9 @@
(defun check-functions (name form &optional (methods t))
":functions|:methods grammar:
"Void. Checks :functions or :methods grammar according to following BNF:
<form> = :functions|:methods (<token>*)
<form> = :functions | :methods (<token>*)
<token> = (<string>* <symbol> <behavior>+ <list> <body>)
<behavior> = :cached | :cached-eql | :cached-= | :cached-eq | :cached-equal | :cached-equalp"
......@@ -130,14 +130,11 @@
(and (symbolp (first token))
(or (listp (second token))
(and (member (second token) behavior)
(listp (third token))))
(check-form name form #'valid-token grammar)
(listp (third token)))))))))
(check-form name form #'valid-token grammar)))))
(defun check-trickle-down-slots (name form)
":functions|:methods grammar:
":functions | :methods grammar:
<form> = :trickle-down-slots (<symbol>*)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment