[climacs-cvs] CVS update: climacs/climacs-en.html climacs/climacs.html climacs/html-syntax.lisp

Robert Strandh rstrandh at common-lisp.net
Fri Apr 8 14:37:01 UTC 2005


Update of /project/climacs/cvsroot/climacs
In directory common-lisp.net:/tmp/cvs-serv31704

Modified Files:
	climacs-en.html climacs.html html-syntax.lisp 
Log Message:
Added <ul>...</ul> and <li>...</li> elements.

Modified some html files to be conform. 

Date: Fri Apr  8 16:37:00 2005
Author: rstrandh

Index: climacs/climacs-en.html
diff -u climacs/climacs-en.html:1.3 climacs/climacs-en.html:1.4
--- climacs/climacs-en.html:1.3	Thu Dec 16 07:29:01 2004
+++ climacs/climacs-en.html	Fri Apr  8 16:36:59 2005
@@ -1,7 +1,7 @@
 <HTML><HEAD><TITLE>Climacs, a modern version of the Emacs editor</TITLE></HEAD>
 <BODY>
 
-<a href="climacs.html">Version française.</a>
+<p><a href="climacs.html">Version française.</a></p>
 
 <h1>Climacs, a modern version of the Emacs editor</h1>
 
@@ -11,33 +11,33 @@
 problems today. :</p>
 
 <ul>
-<li>Emacs Lisp is a language that was specially designed in order to
+<li><p>Emacs Lisp is a language that was specially designed in order to
     implement Emacs.  Since the design of GNU Emacs and of Emacs Lisp,
     Common Lisp has been standardized, and gives both better
     performance than that of Emacs Lisp (because Emacs Lisp is
     implemented as an interpreter written in C) and more sophisticated
     functionalities (macros, CLOS, etc).  The natural choice for
-    implementing Emacs today is thus Common Lisp.</li>
+    implementing Emacs today is thus Common Lisp.</p></li>
 
-<li>GNU Emacs was designed before the existence of the Unicode
+<li><p>GNU Emacs was designed before the existence of the Unicode
     standard.  Unfortunately, the internal representation of a buffer
     does not allow the representation of all Unicode characters in a
     compact way.  An internal representation allowing both all of
     Unicode and a compact representation for the ISO-latin-1 subset is
-    desirable.</li>
+    desirable.</p></li>
 
-<li>Twenty years ago, graphic user interfaces practically did not
+<li><p>Twenty years ago, graphic user interfaces practically did not
     exist.  GNU Emacs was designed for a text-only terminal.  Today
     better modes of interaction exist. In particular, with CLIM
     (Common LIsp Interface Manager) it is both possible and desirable
-    to have an interface based on the concept of "presentation types".</li>
+    to have an interface based on the concept of "presentation types".</p></li>
 
-<li>Because of the limited power of computers at the time, GNU Emacs
+<li><p>Because of the limited power of computers at the time, GNU Emacs
     uses a certain number of approximations in order to analyze the
     contents of a buffer, in particular when that contents is the text
     of a program.  These approximations are no longer necessary, and
     with current technology, it is possible to maintain a complete
-    syntactic analysis of the buffer text. 
+    syntactic analysis of the buffer text. </p></li>
 
 </ul>
 
@@ -67,5 +67,5 @@
 <li><a href="syntax.text">Description of the "syntax" protocol</a></li>
 <li><a href="climacs.tar.gz">Lisp code</a></li>
 </ul>
-
+</body>
 </HTML>


Index: climacs/climacs.html
diff -u climacs/climacs.html:1.4 climacs/climacs.html:1.5
--- climacs/climacs.html:1.4	Fri Apr  8 10:30:42 2005
+++ climacs/climacs.html	Fri Apr  8 16:36:59 2005
@@ -12,36 +12,36 @@
 l'époque posent quelques problèmes aujourd'hui :</p>
 
 <ul>
-<li>Emacs Lisp est un langage spécialement conçu pour implémenter
+<li><p>Emacs Lisp est un langage spécialement conçu pour implémenter
     Emacs.  Depuis la conception de GNU Emacs et du langage Emacs
     LIsp, Common Lisp a été normalisé et propose à la fois une
     efficacité bien supérieure à celle de Emacs Lisp (car Emacs Lisp
     est implémenté sous la forme d'un interpréteur écrit en C) et des
     fonctionnalités plus sophistiqués (macros, CLOS, etc).  Le choix
     naturelle pour implémenter Emacs aujourd'hui est donc Common
-    Lisp.</li>
+    Lisp.</p></li>
 
-<li>GNU Emacs a été conçu avant l'existence de la norme
+<li><p>GNU Emacs a été conçu avant l'existence de la norme
     Unicode.  Malheureusement, la représentation interne d'un
     tampon (buffer) permet difficilement de représenter des
     caractères Unicode de manière compacte et efficace.  Une
     représentation interne permettant à la fois l'ensemble des
     caractères Unicode et une représentation compacte du sous ensemble
-    ISO-latin-1 est souhaitable.</li>
+    ISO-latin-1 est souhaitable.</p></li>
 
-<li>Il y a 20 ans, les interfaces graphiques n'existait pratiquement
+<li><p>Il y a 20 ans, les interfaces graphiques n'existait pratiquement
     pas.  GNU Emacs a été conçu pour un terminal texte.
     D'autres modes d'interaction sont possibles aujourd'hui.  En
     particulier, avec CLIM (Common Lisp Interface Manager) une
     interface basée sur la notion de "types de présentation" est à la
-    fois possible et souhaitable. </li>
+    fois possible et souhaitable. </p></li>
 
-<li>Pour des raisons de la performance limitée des ordinateurs de
+<li><p>Pour des raisons de la performance limitée des ordinateurs de
     l'époque, GNU Emacs se sert d'un certain nombre d'approximations
     pour analyser le contenu d'un tampon, en particulier lorsque ce
     contenu est un programme.  Ces approximations n'ont plus raison
     d'être, et avec la technologie d'aujourd'hui, il est possible de
-    maintenir un analyseur syntaxique incrémental et complet.  
+    maintenir un analyseur syntaxique incrémental et complet.</p></li>
 
 </ul>
 
@@ -71,7 +71,5 @@
 <li><a href="syntax.text">Description du protocole "syntax"</a></li>
 <li><a href="climacs.tar.gz">Code Lisp</a></li>
 </ul>
-
-
-
+</body>
 </HTML>


Index: climacs/html-syntax.lisp
diff -u climacs/html-syntax.lisp:1.25 climacs/html-syntax.lisp:1.26
--- climacs/html-syntax.lisp:1.25	Fri Apr  8 10:30:42 2005
+++ climacs/html-syntax.lisp	Fri Apr  8 16:36:59 2005
@@ -117,8 +117,6 @@
 (define-tag-pair <head> </head> "head")
 (define-tag-pair <title> </title> "title")
 (define-tag-pair <body> </body> "body")
-(define-tag-pair <ul> </ul> "ul")
-(define-tag-pair <li> </li> "li")
 
 (defmacro define-list (name item-name)
   (let ((empty-name (gensym))
@@ -301,7 +299,8 @@
 (defmethod display-parse-tree ((entity heading) (syntax html-syntax) pane)
   (with-slots (start contents end) entity
      (display-parse-tree start syntax pane)
-     (display-parse-tree contents syntax pane)
+     (with-text-face (pane :bold)
+       (display-parse-tree contents syntax pane))
      (display-parse-tree end syntax pane)))
 	      
 (defmacro define-heading (class-name tag-string start-tag-name end-tag-name)
@@ -410,6 +409,103 @@
     (display-parse-tree contents syntax pane)
     (display-parse-tree </p> syntax pane)))
 
+;;;;;;;;;;;;;;; li element
+
+(defclass <li> (html-tag)
+  ((start :initarg :start)
+   (name :initarg :name)
+   (attributes :initarg :attributes)
+   (end :initarg :end)))
+
+(add-html-rule (<li> -> (tag-start
+			 (word (and (= (end-offset tag-start) (start-offset word))
+				    (word-is word "li")))
+			 common-attributes
+			 tag-end)
+		     :start tag-start
+		     :name word
+		     :attributes common-attributes
+		     :end tag-end))
+
+(defmethod display-parse-tree ((entity <li>) (syntax html-syntax) pane)
+  (with-slots (start name attributes end) entity
+    (display-parse-tree start syntax pane)
+    (display-parse-tree name syntax pane)
+    (display-parse-tree attributes syntax pane)
+    (display-parse-tree end syntax pane)))
+
+(define-end-tag </li> "li")
+
+(defclass li-item (html-nonterminal)
+  ((item :initarg :item)))
+
+(add-html-rule (li-item -> (block-level-element) :item block-level-element))
+(add-html-rule (li-item -> (inline-element) :item inline-element))
+
+(defmethod display-parse-tree ((entity li-item) (syntax html-syntax) pane)
+  (with-slots (item) entity
+     (display-parse-tree item syntax pane)))
+
+(define-list li-items li-item)
+
+(defclass li-element (html-nonterminal)
+  ((<li> :initarg :<li>)
+   (items :initarg :items)
+   (</li> :initarg :</li>)))
+
+(add-html-rule (li-element -> (<li> li-items </li>)
+			   :<li> <li> :items li-items :</li> </li>))
+
+(defmethod display-parse-tree ((entity li-element) (syntax html-syntax) pane)
+  (with-slots (<li> items </li>) entity
+     (display-parse-tree <li> syntax pane)
+     (display-parse-tree items syntax pane)     
+     (display-parse-tree </li> syntax pane)))
+
+
+;;;;;;;;;;;;;;; ul element
+
+(defclass <ul> (html-tag)
+  ((start :initarg :start)
+   (name :initarg :name)
+   (attributes :initarg :attributes)
+   (end :initarg :end)))
+
+(add-html-rule (<ul> -> (tag-start
+			 (word (and (= (end-offset tag-start) (start-offset word))
+				    (word-is word "ul")))
+			 common-attributes
+			 tag-end)
+		     :start tag-start
+		     :name word
+		     :attributes common-attributes
+		     :end tag-end))
+
+(defmethod display-parse-tree ((entity <ul>) (syntax html-syntax) pane)
+  (with-slots (start name attributes end) entity
+    (display-parse-tree start syntax pane)
+    (display-parse-tree name syntax pane)
+    (display-parse-tree attributes syntax pane)
+    (display-parse-tree end syntax pane)))
+
+(define-end-tag </ul> "ul")
+
+(define-list li-elements li-element)
+
+(defclass ul-element (block-level-element)
+  ((<ul> :initarg :<ul>)
+   (items :initarg :items)
+   (</ul> :initarg :</ul>)))
+
+(add-html-rule (ul-element -> (<ul> li-elements </ul>)
+			   :<ul> <ul> :items li-elements :</ul> </ul>))
+
+(defmethod display-parse-tree ((entity ul-element) (syntax html-syntax) pane)
+  (with-slots (<ul> items </ul>) entity
+     (display-parse-tree <ul> syntax pane)
+     (display-parse-tree items syntax pane)     
+     (display-parse-tree </ul> syntax pane)))
+
 ;;;;;;;;;;;;;;; body element
 
 (defclass body-item (html-nonterminal)
@@ -603,7 +699,7 @@
 		  :stream pane)))))
 
 (defmethod display-parse-tree :around ((entity html-tag) (syntax html-syntax) pane)
-  (with-drawing-options (pane :ink +green+)
+  (with-drawing-options (pane :ink +green4+)
     (call-next-method)))
 
 (defmethod display-parse-tree :before ((entity html-token) (syntax html-syntax) pane)




More information about the Climacs-cvs mailing list