Fri Jun 5 16:17:33 CEST 2009 Tobias Rautenkranz * Lisp syntax highlighting diff -rN -u old-doc/Makefile new-doc/Makefile --- old-doc/Makefile 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/Makefile 2014-10-30 07:12:04.000000000 +0100 @@ -1,22 +1,36 @@ # # Dependancies: -# xmllint xsltproc docbook +# - xmllint +# - saxon +# - docbook +# - xslthl # +# Debian: download the xslthl jar into the doc/ directory; install the remaining dependancies with apt. +# + +SAXON_JAR := /usr/share/java/saxon.jar +XSLTHL_JAR := $(firstword $(wildcard xslthl*.jar)) +CLASSPATH := "$(SAXON_JAR):$(XSLTHL_JAR)" +SAXON := java -classpath $(CLASSPATH) \ + -Dxslthl.config="file://$(realpath xslthl-config.xml)" \ + com.icl.saxon.StyleSheet all: manual.html index.html DEPENDANCIES := *.xml *.xsl ../qt.examples/src/*.lisp ../kde.examples/src/*.lisp *.dtd -manual.html: $(DEPENDANCIES) - xmllint --xinclude --postvalid manual.xml > /dev/null - xsltproc --xinclude -o $@ manual.xsl manual.xml - -index.html: $(DEPENDANCIES) -# xsltproc --xinclude --stringparam base.dir "manual/" chunk.xsl manual.xml - xsltproc --xinclude chunk.xsl manual.xml +# validate & process xincludes +manual.tmp: $(DEPENDANCIES) + xmllint --xinclude --postvalid manual.xml > manual.tmp + + +manual.html: manual.tmp + $(SAXON) -o manual.html manual.tmp manual.xsl + - +index.html: manual.tmp + $(SAXON) manual.tmp chunk.xsl .PHONY: clean clean: - rm -f -- *.html + rm -f -- *.html *.tmp diff -rN -u old-doc/chunk.xsl new-doc/chunk.xsl --- old-doc/chunk.xsl 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/chunk.xsl 2014-10-30 07:12:04.000000000 +0100 @@ -5,6 +5,9 @@ + + + diff -rN -u old-doc/kde.xml new-doc/kde.xml --- old-doc/kde.xml 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/kde.xml 2014-10-30 07:12:04.000000000 +0100 @@ -12,11 +12,11 @@
Examples The examples can be run with: - + (mb:load :kde.examples) And then running the function of the example; e.g.: - + (kde.examples:mandelbrot) diff -rN -u old-doc/lisp-hl.xml new-doc/lisp-hl.xml --- old-doc/lisp-hl.xml 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/lisp-hl.xml 2014-10-30 07:12:04.000000000 +0100 @@ -0,0 +1,109 @@ + + + + + defun + defgeneric + defmethod + lambda + + if + when + unless + + let + let* + + defvar + defparameter + defpackage + + defclass + defstruct + + declare + declaim + proclaim + + + + in-package + + + + + + #| + |# + + + + ; + + + + + " + + + + + + (?<=[ \(])(:[^\s\)]+) + + + + + + + (?<=defclass\s)(\S+) + + + + + (?<=defun\s)(\S+) + + + + + (?<=defgeneric\s)(\S+) + + + + + (?<=defmethod\s)(\S+) + + + + + (?<=defvar\s)(\S+) + + + + + (?<=defparameter\s)(\S+) + + + + + (?<=defstruct\s)(\S+) + + + + + + . + d + e + f + l + s + + + + + #x + + + diff -rN -u old-doc/manual.xsl new-doc/manual.xsl --- old-doc/manual.xsl 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/manual.xsl 2014-10-30 07:12:04.000000000 +0100 @@ -5,4 +5,7 @@ + + + diff -rN -u old-doc/qt.xml new-doc/qt.xml --- old-doc/qt.xml 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/qt.xml 2014-10-30 07:12:04.000000000 +0100 @@ -73,7 +73,7 @@ or a C++ slot a return from qt:get-slot. Quit - + @@ -97,7 +97,7 @@ The name of the property can be either a string in C++ style or a symbol in Lisp style. - + (let ((object (make-instance 'qt:object))) (setf (qt:property object 'object-name) "Foo") (assert (string= "Foo" (qt:property object "objectName")))) @@ -128,7 +128,7 @@ - + @@ -154,7 +154,7 @@
Examples You can run the examples with: - + (mb:load :qt.examples) (qt.examples:launcher) diff -rN -u old-doc/smoke.xml new-doc/smoke.xml --- old-doc/smoke.xml 2014-10-30 07:12:04.000000000 +0100 +++ new-doc/smoke.xml 2014-10-30 07:12:04.000000000 +0100 @@ -22,13 +22,13 @@ C++ classes have a corresponding CLOS class. The can be used like any CLOS class; E.g: to make a QObject instance: - + (make-instance 'qt:object) Supply arguments as list to the :args keyword: - + (let ((parent (make-instance 'qt:object))) (make-instance 'qt:object :args (list parent))) @@ -37,7 +37,7 @@ To extend a C++ class you have to use cxx:class as metaclass: - + (defclass my-object (qt:object) () (:metaclass cxx:class)) @@ -53,20 +53,20 @@ The C++ method call: myInstance->frob(1); is in Lisp: -(frob my-instance 1) +(frob my-instance 1)
Overload Resolution C++ style overload resolution with conversion sequences is supported. For example this: - + (cxx:set-pen (make-instance 'qt:painter) (make-instance 'qt:color :args '("green"))) is equivalent to: - + (cxx:set-pen (make-instance 'qt:painter) "green") @@ -81,13 +81,13 @@ Instead of calling a setter method that takes no additional arguments, - + (cxx:set-object-name (make-instance 'qt:object) "foo") you can use its setfable getter. - + (setf (cxx:object-name (make-instance 'qt:object)) "foo") @@ -101,7 +101,7 @@ and (call-next-method) are supported. -(defclass the-object-does-nothing (qt:object) +(defclass the-object-does-nothing (qt:object) () (:metaclass cxx:class)) @@ -174,16 +174,16 @@ The static C++ method QByteArray::number(int n, int base=10) can be called by: -(qt:byte-array.number 37) +(qt:byte-array.number 37) which is equivalent to the C++ code QByteArray::number(37);. Or with: -(cxx:number (find-class 'qt:byte-array) 37) +(cxx:number (find-class 'qt:byte-array) 37) or: -(cxx:number (make-instance 'qt:byte-array) 37) +(cxx:number (make-instance 'qt:byte-array) 37)
@@ -210,7 +210,7 @@ An instance may depend on an other one. It is a bad idea to do something like this: - + (defvar *meta* (cxx:meta-object (make-instance 'qt:object))) *meta* references a qt:meta-class diff -rN -u old-doc/xslthl-config.xml new-doc/xslthl-config.xml --- old-doc/xslthl-config.xml 1970-01-01 01:00:00.000000000 +0100 +++ new-doc/xslthl-config.xml 2014-10-30 07:12:04.000000000 +0100 @@ -0,0 +1,5 @@ + + + + +