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: Juri Linkov
Subject: Re: trivial bug of font-lock in Change Log mode.
Date: Fri, 27 May 2005 14:45:29 +0300
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> For instance, emacs/src/ChangeLog has this line near the
> end.
>
> See ChangeLog.9 for earlier changes.
>
> When I visit this file and turn on font-lock mode, "See
> Change" (the first 10 characters) gets change-log-data-face.
>
> It seems that the attached change fix the problem, but, it
> may fail if there are some other old style than these two:
>
> Wed Aug 21 03:51:42 1996
> 2005-05-16
>
> Could someone verify it?

This will cover most ChangeLog files, but I'd rather move your new
restricted date regexp to a new special variable `change-log-date-regexp'
(and using it in `change-log-font-lock-keywords'), thus allowing users
to override it by file local variables in ChangeLog files with a different
date format.

Also it seems that the format for arbitrary text in ChangeLog files is
a line beginning with two spaces.  Look for example in the same file
emacs/src/ChangeLog for the copyright statement.  It is indented with
two spaces, probably with the intention to not highlight it as a date:

    Copyright (C) 2001, 02, 04  Free Software Foundation, Inc.
  Copying and distribution of this file, with or without modification,
  are permitted provided the copyright notice and this notice are preserved.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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