In article <[EMAIL PROTECTED]>, Richard Stallman <[EMAIL PROTECTED]> writes:

>>        ;; Date lines, new and old styles.
>>      !     
>> ("^\\([1-9][0-9][0-9][0-9]-[0-9-]+\\|\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\)
>>  \\sw\\sw\\sw\\)[0-9:+ ]*"
>>         (0 'change-log-date-face)

>>  Shouldn't that regexp end with + rather than *?

>     The original regexp also ended with '*', and I don't know
>     all the variations of date line.

> It seems to me that it could not be a valid date
> if that match is empty.  Don't you think so?

The regexp always matches with non-empty text even if the
last is '*'.  If we include the part "[0-9:+ ]*" in the
second paren part, then I agree that the last should be '+'
as this:

"^\\([1-9][0-9][0-9][0-9]-[0-9-]+\\|\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\)
 \\sw\\sw\\sw[0-9:+ ]+\\)"

But, then, we don't need the top-level paren and we can use this:

"^[1-9][0-9][0-9][0-9]-[0-9-]+\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\|Sun\\)
 \\sw\\sw\\sw[0-9:+ ]+"

Anyway, I think this kind of discussion is useless unless we
know what kind of date format we are going to support.  For
instance, the current one doesn't handle this kind of date
format (note "JST"):

Sat May 28 09:41:40 JST 2005

I personally think that it's ok that we support only the
current format; something like "2005-05-13".

---
Kenichi Handa
[EMAIL PROTECTED]


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

Reply via email to