[C] xemacsweb: Fix commenting of lisp fragment in About/XEmacsServices.content

Adrian Aichner adrian at xemacs.org
Tue Nov 6 16:03:08 EST 2007


COMMIT

Solution is a bit more complicated than I'd like, but neither "--" nor
">" must appear literally inside SGML comments, according to
http://htmlhelp.com/reference/wilbur/misc/comment.html, which isn't
normative, but a good practical explanation for me.

Simplifications are welcome.

A real issue tracker would even be better :-)

Adrian

xemacsweb ChangeLog patch:
Diff command:   cvs -q diff -U 0
Files affected: About/ChangeLog

Index: About/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/About/ChangeLog,v
retrieving revision 1.217
diff -u -U0 -r1.217 ChangeLog
--- About/ChangeLog	5 Nov 2007 11:23:53 -0000	1.217
+++ About/ChangeLog	6 Nov 2007 20:54:39 -0000
@@ -0,0 +1,4 @@
+2007-11-06  Adrian Aichner  <adrian at xemacs.org>
+
+	* XEmacsServices.content: Fix commenting of lisp fragment.
+

xemacsweb source patch:
Diff command:   cvs -f -z3 -q diff -u -w -N
Files affected: About/XEmacsServices.content
===================================================================
RCS About/ChangeLog
===================================================================
RCS

Index: About/XEmacsServices.content
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacsweb/About/XEmacsServices.content,v
retrieving revision 1.70
diff -u -w -r1.70 XEmacsServices.content
--- About/XEmacsServices.content	5 Nov 2007 11:23:54 -0000	1.70
+++ About/XEmacsServices.content	6 Nov 2007 20:56:54 -0000
@@ -50,19 +50,27 @@
       </tr>
 
 <!--
-; Evaluate this expresssion below to insert a new, properly numbered
+; Evaluate the lisp expresssion below to insert a new, properly numbered
 ; issue in the correct place (at the top of the issue list).  Take note
-; we have to quote SGML comment endings in this comment section,
-; e.g. as --\>
-(let
-    ((next-issue-insert-point
+; we have to quote the SGML comment delimiter in this comment section.
+; See `sgml-comment-begin', `sgml-comment-end', and
+; http://htmlhelp.com/reference/wilbur/misc/comment.html
+(let*
+    ((sgml-comment-begin (format "%c%s%s%s" #x3c "!" "-" "-"))
+     (sgml-comment-end (format "%s%s%c" "-" "-" #x3e))
+     (next-issue-insert-point
       (save-excursion
         (goto-char (point-min))
         (and
-         ;; We have to quote SGML comment endings in this comment
-         ;; section, e.g. as --\>
+         ;; We have to quote SGML comment delimiters in this comment
+         ;; section.
+         ;; See `sgml-comment-begin', `sgml-comment-end', and
+         ;; http://htmlhelp.com/reference/wilbur/misc/comment.html
          (search-forward-regexp
-          "[ \t]+<tr>\n[ \t]+<!-- .+ --\>\n[ \t]+<td rowspan=\"7\" valign=\"top\"><a id=\"issue" nil t)
+          (format
+           "[ \t]+<tr>\n[ \t]+%s .+ %s\n[ \t]+<td rowspan=\"7\" valign=\"top\"><a id=\"issue"
+           sgml-comment-begin sgml-comment-end)
+          nil t)
          (match-beginning 0))))
      (next-issue-number
       (1+
@@ -75,11 +83,12 @@
       (message "failed to find insertion point for next xemacs service issue!")
     (goto-char next-issue-insert-point)
     (insert
-     ;; We have to quote SGML comment endings in this comment section,
-     ;; e.g. as --\>
+     ;; We have to quote SGML comment endings in this comment section.
+     ;; See `sgml-comment-begin', `sgml-comment-end', and
+     ;; http://htmlhelp.com/reference/wilbur/misc/comment.html
      (format
-      "      <tr>\n        <!-- Issue ID --\>\n        <td rowspan=\"7\" valign=\"top\"><a id=\"issue%1$d\" name=\"issue%1$d\">%1$d</a></td>\n        <!-- Service(s) --\>\n        <td>all services of gwyn.tux.org are unavailable: DNS for xemacs.org, ssh, http, ftp</td>\n        <!-- YYYY-MM-DD( HH:MM:SS UTC) Date found --\>\n        <td nowrap=\"nowrap\">YYYY-MM-DD( HH:MM:SS UTC)</td>\n        <!-- YYYY-MM-DD( HH:MM:SS UTC) Date fixed --\>\n        <td nowrap=\"nowrap\">YYYY-MM-DD( HH:MM:SS UTC)</td>\n      </tr>\n      <tr>\n\t<!-- Error(s), Symptom(s) --\>\n        <th colspan=\"3\">Error(s), Symptom(s)</th>\n      </tr>\n      <tr>\n      <td colspan=\"3\">\n\t  <p>free-form description of a error or symptom.</p>\n          <pre xml:space=\"preserve\">\nSending failed; SMTP protocol error\n221 Closing connection. Good bye.\n\t  </pre>\n\t</td>\n      </tr>\n      <tr>\n\t<!-- Resolution(s) --\>\n        <th colspan=\"3\">Resolution(s)</th>\n      </tr>\n      <tr>\n     !
    <td colspan=\"3\">\n\t  <p>Description of resolution.</p>\n\t</td>\n      </tr>\n      <tr>\n\t<!-- Reference(s) --\>\n        <th colspan=\"3\">References</th>\n      </tr>\n      <tr>\n        <td colspan=\"3\">\n\t  <p>References to other information, like URLs for external issue documenation.</p>\n\t</td>\n      </tr>\n\n"
-      next-issue-number))))
+      "      <tr>\n        %2$s Issue ID %3$s\n        <td rowspan=\"7\" valign=\"top\"><a id=\"issue%1$d\" name=\"issue%1$d\">%1$d</a></td>\n        %2$s Service(s) %3$s\n        <td>all services of gwyn.tux.org are unavailable: DNS for xemacs.org, ssh, http, ftp</td>\n        %2$s YYYY-MM-DD( HH:MM:SS UTC) Date found %3$s\n        <td nowrap=\"nowrap\">YYYY-MM-DD( HH:MM:SS UTC)</td>\n        %2$s YYYY-MM-DD( HH:MM:SS UTC) Date fixed %3$s\n        <td nowrap=\"nowrap\">YYYY-MM-DD( HH:MM:SS UTC)</td>\n      </tr>\n      <tr>\n\t%2$s Error(s), Symptom(s) %3$s\n        <th colspan=\"3\">Error(s), Symptom(s)</th>\n      </tr>\n      <tr>\n      <td colspan=\"3\">\n\t  <p>free-form description of a error or symptom.</p>\n          <pre xml:space=\"preserve\">\nSending failed; SMTP protocol error\n221 Closing connection. Good bye.\n\t  </pre>\n\t</td>\n      </tr>\n      <tr>\n\t%2$s Resolution(s) %3$s\n        <th colspan=\"3\">Resolution(s)</th>\n      </tr>\n      <tr>\n     !
    <td colspan=\"3\">\n\t  <p>Description of resolution.</p>\n\t</td>\n      </tr>\n      <tr>\n\t%2$s Reference(s) %3$s\n        <th colspan=\"3\">References</th>\n      </tr>\n      <tr>\n        <td colspan=\"3\">\n\t  <p>References to other information, like URLs for external issue documenation.</p>\n\t</td>\n      </tr>\n\n"
+      next-issue-number sgml-comment-begin sgml-comment-end))))
 -->
 
 	<tr>

-- 
Adrian Aichner
 mailto:adrian at xemacs.org
 http://www.xemacs.org/




More information about the XEmacs-Patches mailing list