emacs-devel
[Top][All Lists]
Advanced

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

Fontification of calendar breaks localization


From: Romain FRANCOISE
Subject: Fontification of calendar breaks localization
Date: Tue, 26 Nov 2002 17:35:20 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

Hi,

recently a patch by Alan Shutko which allows fontification of the
Calendar and Diary buffers was applied to the trunk.  It is a very nice
feature, however it breaks when you're using a "localized" Calendar;
that is if you have changed the month and day names to reflect your
language's.

For instance in my case (in French), I have:

(setq calendar-day-name-array
      ["Dimanche" "Lundi" "Mardi" "Mercredi" "Jeudi" "Vendredi" "Samedi"]
      calendar-month-name-array
      ["Janvier" "Février" "Mars" "Avril" "Mai" "Juin" "Juillet"
       "Août" "Septembre" "Octobre" "Novembre" "Décembre"])

so that the Diary and Calendar are displayed in French.

Alan's patch uses a regular expression to recognize month names and
fontify them, this regular expression does not match with accentuated
characters, so some month names get fontified and others don't.

I have written a quick fix that builds the regular expression using the
names defined in `calendar-month-name-array' so that it always
accurately matches month names.  It is in the attached patch (against
the current CVS).

What do you think?

        Romain.

-- 
Romain FRANCOISE <address@hidden> | You know that old saying,
it's a miracle -- http://orebokech.com/ | that you always hurt the ones
                                        | you love? Well it works both
                                        | ways.

Attachment: cal-font-lock.patch
Description: fontification fix


reply via email to

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