[mcclim-cvs] CVS mcclim/Doc

thenriksen thenriksen at common-lisp.net
Mon Aug 20 17:52:45 UTC 2007


Update of /project/mcclim/cvsroot/mcclim/Doc
In directory clnet:/tmp/cvs-serv18549/Doc

Modified Files:
	drei.texi docstrings.lisp 
Log Message:
Finished documentation for syntax command tables.


--- /project/mcclim/cvsroot/mcclim/Doc/drei.texi	2007/01/22 11:37:12	1.7
+++ /project/mcclim/cvsroot/mcclim/Doc/drei.texi	2007/08/20 17:52:44	1.8
@@ -1245,7 +1245,29 @@
 In order to provide conditionally active command tables, Drei defines
 the @class{syntax-command-table} class. While this class is meant to
 facilitate the addition of commands to syntaxes when they are run in a
-specific context (for example, a large editor application adding a Show
-Macroexpansion command to Lisp syntax), their modus operandi is general
-enough to be used for all conditional activity of command tables.
+specific context (for example, a large editor application adding a
+ at command{Show Macroexpansion} command to Lisp syntax), their modus
+operandi is general enough to be used for all conditional activity of
+command tables. This is useful for making commands available that
+could not be generally implemented for all Drei instances ---
+returning to the @command{Show Macroexpansion} example, such a command
+can only be implemented if there is a sufficiently large place to show
+the expansion, and this might not be available for a generic Drei
+input-editor instance, but could be provided by an application
+designed for it.
 
+Syntax command tables work by conditionally inheriting from other
+command tables, so it is necessary to define one (or more) command
+tables for the commands you wish to make conditionally available.
+
+When providing a @var{:command-table} argument to
+ at fmacro{define-syntax} that names a syntax command table, an instance
+of the syntax command table will be used for the syntax.
+
+ at include class-drei-syntax-syntax-command-table.texi
+
+ at include fun-drei-syntax-use-editor-commands-p.texi
+
+ at include fun-drei-syntax-additional-command-tables.texi
+
+ at include macro-drei-syntax-define-syntax-command-table.texi
--- /project/mcclim/cvsroot/mcclim/Doc/docstrings.lisp	2006/12/21 12:22:03	1.1
+++ /project/mcclim/cvsroot/mcclim/Doc/docstrings.lisp	2007/08/20 17:52:44	1.2
@@ -764,26 +764,37 @@
        (format *texinfo-output* "@findex ~A~%" title)))))
 
 (defun texinfo-inferred-body (doc)
-  (when (member (get-kind doc) '(class structure condition))
-    (let ((name (get-name doc)))
-      ;; class precedence list
-      (format *texinfo-output* "Class precedence list: @code{~(~{@w{~A}~^, ~}~)}~%~%"
-              (remove-if (lambda (class)  (hide-superclass-p name class))
-                         (mapcar #'class-name (class-precedence-list (progn (finalize-inheritance (find-class name))
-                                                                            (find-class name))))))
-      ;; slots
-      (let ((slots (remove-if (lambda (slot) (hide-slot-p name slot))
-                              (class-direct-slots (find-class name)))))
-        (when slots
-          (format *texinfo-output* "Slots:~%@itemize~%")
-          (dolist (slot slots)
-            (format *texinfo-output* "@item ~(@code{~A} ~
+  (cond ((member (get-kind doc) '(class structure condition))
+         (let ((name (get-name doc)))
+           ;; class precedence list
+           (format *texinfo-output* "Class precedence list: @code{~(~{@w{~A}~^, ~}~)}~%~%"
+                   (remove-if (lambda (class)  (hide-superclass-p name class))
+                              (mapcar #'class-name (class-precedence-list (progn (finalize-inheritance (find-class name))
+                                                                                 (find-class name))))))
+           ;; slots
+           (let ((slots (remove-if (lambda (slot) (hide-slot-p name slot))
+                                   (class-direct-slots (find-class name)))))
+             (when slots
+               (format *texinfo-output* "Slots:~%@itemize~%")
+               (dolist (slot slots)
+                 (format *texinfo-output* "@item ~(@code{~A} ~
                                      ~@[--- initargs: @code{~{@w{~S}~^, ~}}~]~)~%~%"
-                    (slot-definition-name slot)
-                    (slot-definition-initargs slot))
-            ;; FIXME: Would be neater to handler as children
-            (write-texinfo-string (docstring slot t)))
-          (format *texinfo-output* "@end itemize~%~%"))))))
+                         (slot-definition-name slot)
+                         (slot-definition-initargs slot))
+                 ;; FIXME: Would be neater to handler as children
+                 (write-texinfo-string (docstring slot t)))
+               (format *texinfo-output* "@end itemize~%~%")))))
+        ((eq (get-kind doc) 'generic-function)
+         (let* ((method-combination
+                 (sb-mop:generic-function-method-combination
+                  (fdefinition (get-name doc))))
+                (combination-name (sb-pcl::method-combination-type-name
+                                   method-combination))
+                (options (sb-pcl::method-combination-options method-combination)))
+           (unless (eq combination-name 'standard)
+             (format *texinfo-output*
+                     "Method combination: @code{~A} (~(~{@w{~A}~^, ~}~))~%~%"
+                     combination-name options))))))
 
 (defun texinfo-body (doc)
   (write-texinfo-string (get-string doc)))




More information about the Mcclim-cvs mailing list