unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: emacs-devel@gnu.org
Subject: Re: trivial bug of font-lock in Change Log mode.
Date: Fri, 10 Jun 2005 11:25:23 +0900	[thread overview]
Message-ID: <E1DgZD1-0004He-00@etlken> (raw)
In-Reply-To: <E1Dbzs6-0004uY-VM@fencepost.gnu.org> (message from Richard Stallman on Sat, 28 May 2005 07:52:54 -0400)

In article <E1Dbzs6-0004uY-VM@fencepost.gnu.org>, Richard Stallman <rms@gnu.org> writes:

>     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

> The idea is to handle date formats that were actually used in change
> logs, now or in the past.  We don't want to aim to handle all date formats
> that people use in other contexts.

A user can use any kind of date formats in the context of
ChangeLog file by customizing add-log-time-format.

> I recall that we did previously use a different date format.
> I don't remember what it was, but maybe you can find it from
> old versions of add-log.el.

Yes, that's something like this:
Sat Jan  1 00:00:00 2000

If what you really mean is: "... handle the DEFAULT date
formats that were actually used in Emacs ...", I'd like to
install the attached patch.

---
Kenichi Handa
handa@m17n.org

Index: add-log.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/add-log.el,v
retrieving revision 1.163
diff -c -r1.163 add-log.el
*** add-log.el	29 May 2005 16:09:04 -0000	1.163
--- add-log.el	10 Jun 2005 02:20:26 -0000
***************
*** 216,223 ****
  
  (defvar change-log-font-lock-keywords
    '(;;
!     ;; Date lines, new and old styles.
!     ("^\\sw.........[0-9:+ ]*"
       (0 'change-log-date-face)
       ;; Name and e-mail; some people put e-mail in parens, not angles.
       ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil
--- 216,227 ----
  
  (defvar change-log-font-lock-keywords
    '(;;
!     ;; Date lines, new (2000-01-01) and old (Sat Jan  1 00:00:00 2000) styles.
!     ;; Fixme: this regepx is just an approximate one and may match
!     ;; wrongly with a non-date line existing as a random note.  In
!     ;; addition, using any kind of fixed setting like this doesn't
!     ;; work if a user customizes add-log-time-format.
!     ("^[0-9-]+ +\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-z][a-z][a-z] [0-9:+ ]+"
       (0 'change-log-date-face)
       ;; Name and e-mail; some people put e-mail in parens, not angles.
       ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil

  reply	other threads:[~2005-06-10  2:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-26  1:00 trivial bug of font-lock in Change Log mode Kenichi Handa
2005-05-26 14:54 ` Richard Stallman
2005-05-27  0:32   ` Kenichi Handa
2005-05-27 14:20     ` Richard Stallman
2005-05-28  0:48       ` Kenichi Handa
2005-05-28 11:52         ` Richard Stallman
2005-06-10  2:25           ` Kenichi Handa [this message]
2005-05-27 11:45 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1DgZD1-0004He-00@etlken \
    --to=handa@m17n.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).