emacs-devel
[Top][All Lists]
Advanced

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

Re: trivial bug of font-lock in Change Log mode.


From: Kenichi Handa
Subject: Re: trivial bug of font-lock in Change Log mode.
Date: Sat, 28 May 2005 09:48:47 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI)

In article <address@hidden>, Richard Stallman <address@hidden> 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
address@hidden




reply via email to

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