[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs - Time-stanp:

From: Kevin Rodgers
Subject: Re: Emacs - Time-stanp:
Date: Thu, 05 Oct 2006 18:21:49 -0600
User-agent: Thunderbird (Windows/20060909)

Rick Stanley wrote:

In trying to use the emacs Time-stamp: in writing some XHTML/CSS code, I
used the following:

<meta name="revised" content="Time-stamp: <2006-10-04 13:55:39 rick>" />

This will not pass the W3C XHTML or CSS validators, for a '<' or '>'
being embedded within an XML attribute .

The only way I could get Time-stamp: to work was to comment out the
whole line:

<!--  <meta name="revised" content="Time-stamp: &lt;2006-10-04 13:55:39
rick&gt;" /> -->

The Time-stamp: works, but I loose the 'revised' Meta Data.

I would like to see '&lt;' and '&gt;' be recognized along with the
current '<>' and '""' deliminators for Time-stamp:, or some other
deliminator that conforms to valid characters as data inside of an XML

Assuming your XHTML files (which are not code, by the way) are in XML
mode (aka SGML mode in Emacs), try this:

(add-hook 'sgml-mode-hook
          (lambda ()
            (set (make-local-variable 'time-stamp-start)
                 (replace-regexp-in-string (regexp-quote "[\"<]")
                                           t t))
            (set (make-local-variable 'time-stamp-end)
                 (replace-regexp-in-string (regexp-quote "[\">]")
                                           t t))))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]