Mercurial > emacs
comparison lisp/calendar/cal-french.el @ 92905:0cea6abac18e
(french-calendar-accents): Move definition after constants.
(french-calendar-epoch, calendar-goto-french-date): Doc fix.
(french-calendar-month-name-array)
(french-calendar-multibyte-month-name-array)
(french-calendar-day-name-array, french-calendar-special-days-array):
Add doc strings.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 14 Mar 2008 03:14:59 +0000 |
parents | f14a38040473 |
children | 943c6058b43a |
comparison
equal
deleted
inserted
replaced
92904:66a73bbde687 | 92905:0cea6abac18e |
---|---|
38 ;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404. | 38 ;; Experience, Volume 23, Number 4 (April, 1993), pages 383-404. |
39 | 39 |
40 ;;; Code: | 40 ;;; Code: |
41 | 41 |
42 (require 'calendar) | 42 (require 'calendar) |
43 | |
44 (defconst french-calendar-epoch (calendar-absolute-from-gregorian '(9 22 1792)) | |
45 "Absolute date of start of French Revolutionary calendar = Sept 22, 1792.") | |
46 | |
47 (defconst french-calendar-month-name-array | |
48 ["Vende'miaire" "Brumaire" "Frimaire" "Nivo^se" "Pluvio^se" "Vento^se" | |
49 "Germinal" "Flore'al" "Prairial" "Messidor" "Thermidor" "Fructidor"] | |
50 "Array of month names in the French calendar.") | |
51 | |
52 (defconst french-calendar-multibyte-month-name-array | |
53 ["Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse" | |
54 "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor"] | |
55 "Array of multibyte month names in the French calendar.") | |
56 | |
57 (defconst french-calendar-day-name-array | |
58 ["Primidi" "Duodi" "Tridi" "Quartidi" "Quintidi" "Sextidi" "Septidi" | |
59 "Octidi" "Nonidi" "Decadi"] | |
60 "Array of day names in the French calendar.") | |
61 | |
62 (defconst french-calendar-special-days-array | |
63 ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses" | |
64 "de la Re'volution"] | |
65 "Array of special day names in the French calendar.") | |
66 | |
67 (defconst french-calendar-multibyte-special-days-array | |
68 ["de la Vertu" "du Génie" "du Travail" "de la Raison" "des Récompenses" | |
69 "de la Révolution"] | |
70 "Array of multibyte special day names in the French calendar.") | |
43 | 71 |
44 (defun french-calendar-accents () | 72 (defun french-calendar-accents () |
45 "True if diacritical marks are available." | 73 "True if diacritical marks are available." |
46 (and (or window-system | 74 (and (or window-system |
47 (terminal-coding-system)) | 75 (terminal-coding-system)) |
48 (or enable-multibyte-characters | 76 (or enable-multibyte-characters |
49 (and (char-table-p standard-display-table) | 77 (and (char-table-p standard-display-table) |
50 (equal (aref standard-display-table 161) [161]))))) | 78 (equal (aref standard-display-table 161) [161]))))) |
51 | |
52 (defconst french-calendar-epoch (calendar-absolute-from-gregorian '(9 22 1792)) | |
53 "Absolute date of start of French Revolutionary calendar = September 22, 1792.") | |
54 | |
55 (defconst french-calendar-month-name-array | |
56 ["Vende'miaire" "Brumaire" "Frimaire" "Nivo^se" "Pluvio^se" "Vento^se" | |
57 "Germinal" "Flore'al" "Prairial" "Messidor" "Thermidor" "Fructidor"]) | |
58 | |
59 (defconst french-calendar-multibyte-month-name-array | |
60 ["Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse" | |
61 "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor"]) | |
62 | |
63 (defconst french-calendar-day-name-array | |
64 ["Primidi" "Duodi" "Tridi" "Quartidi" "Quintidi" "Sextidi" "Septidi" | |
65 "Octidi" "Nonidi" "Decadi"]) | |
66 | |
67 (defconst french-calendar-multibyte-special-days-array | |
68 ["de la Vertu" "du Génie" "du Travail" "de la Raison" "des Récompenses" | |
69 "de la Révolution"]) | |
70 | |
71 (defconst french-calendar-special-days-array | |
72 ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses" | |
73 "de la Re'volution"]) | |
74 | 79 |
75 (defun french-calendar-month-name-array () | 80 (defun french-calendar-month-name-array () |
76 "Return the array of month names, depending on whether accents are available." | 81 "Return the array of month names, depending on whether accents are available." |
77 (if (french-calendar-accents) | 82 (if (french-calendar-accents) |
78 french-calendar-multibyte-month-name-array | 83 french-calendar-multibyte-month-name-array |
198 (message "French Revolutionary date: %s" f)))) | 203 (message "French Revolutionary date: %s" f)))) |
199 | 204 |
200 ;;;###cal-autoload | 205 ;;;###cal-autoload |
201 (defun calendar-goto-french-date (date &optional noecho) | 206 (defun calendar-goto-french-date (date &optional noecho) |
202 "Move cursor to French Revolutionary date DATE. | 207 "Move cursor to French Revolutionary date DATE. |
203 Echo French Revolutionary date unless NOECHO is t." | 208 Echo French Revolutionary date unless NOECHO is non-nil." |
204 (interactive | 209 (interactive |
205 (let ((accents (french-calendar-accents)) | 210 (let ((accents (french-calendar-accents)) |
206 (months (french-calendar-month-name-array)) | 211 (months (french-calendar-month-name-array)) |
207 (special-days (french-calendar-special-days-array))) | 212 (special-days (french-calendar-special-days-array))) |
208 (let* ((year | 213 (let* ((year |