emacs-diffs
[Top][All Lists]
Advanced

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

master 0f65baa 3/5: * lisp/calendar/cal-french.el (calendar-french-accen


From: Stefan Monnier
Subject: master 0f65baa 3/5: * lisp/calendar/cal-french.el (calendar-french-accents-p): Obsolete function
Date: Wed, 20 Jan 2021 23:57:06 -0500 (EST)

branch: master
commit 0f65baa03b54dc95b24b765bc91370354743a449
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/calendar/cal-french.el (calendar-french-accents-p): Obsolete function
    
    Always assume accented letters can be used
    
    (calendar-french-month-name-array)
    (calendar-french-special-days-array): Use the accented names.
    (calendar-french-multibyte-month-name-array)
    (calendar-french-multibyte-special-days-array): Make those vars
    obsolete aliases.
    (calendar-french-month-name-array, calendar-french-day-name-array)
    (calendar-french-special-days-array): Mark functions as obsolete.
    (calendar-french-date-string, calendar-french-goto-date): Always use
    the text with accents.
---
 lisp/calendar/cal-french.el | 59 +++++++++++++++++----------------------------
 1 file changed, 22 insertions(+), 37 deletions(-)

diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el
index e759b5d..c8ab6c4 100644
--- a/lisp/calendar/cal-french.el
+++ b/lisp/calendar/cal-french.el
@@ -35,54 +35,45 @@
 (defconst calendar-french-epoch (calendar-absolute-from-gregorian '(9 22 1792))
   "Absolute date of start of French Revolutionary calendar = Sept 22, 1792.")
 
-(defconst calendar-french-month-name-array
-  ["Vende'miaire" "Brumaire" "Frimaire" "Nivo^se" "Pluvio^se" "Vento^se"
-   "Germinal" "Flore'al" "Prairial" "Messidor" "Thermidor" "Fructidor"]
-  "Array of month names in the French calendar.")
+(define-obsolete-variable-alias 'calendar-french-multibyte-month-name-array
+  'calendar-french-month-name-array "28.1")
 
-(defconst calendar-french-multibyte-month-name-array
+(defconst calendar-french-month-name-array
   ["Vendémiaire" "Brumaire" "Frimaire" "Nivôse" "Pluviôse" "Ventôse"
    "Germinal" "Floréal" "Prairial" "Messidor" "Thermidor" "Fructidor"]
-  "Array of multibyte month names in the French calendar.")
+  "Array of month names in the French calendar.")
 
 (defconst calendar-french-day-name-array
   ["Primidi" "Duodi" "Tridi" "Quartidi" "Quintidi" "Sextidi" "Septidi"
    "Octidi" "Nonidi" "Decadi"]
   "Array of day names in the French calendar.")
 
-(defconst calendar-french-special-days-array
-  ["de la Vertu" "du Ge'nie" "du Travail" "de la Raison" "des Re'compenses"
-   "de la Re'volution"]
-  "Array of special day names in the French calendar.")
+(define-obsolete-variable-alias 'calendar-french-multibyte-special-days-array
+  'calendar-french-special-days-array "28.1")
 
-(defconst calendar-french-multibyte-special-days-array
+(defconst calendar-french-special-days-array
   ["de la Vertu" "du Génie" "du Travail" "de la Raison" "des Récompenses"
    "de la Révolution"]
-  "Array of multibyte special day names in the French calendar.")
+  "Array of special day names in the French calendar.")
 
 (defun calendar-french-accents-p ()
-  "Return non-nil if diacritical marks are available."
-  (and (or window-system
-           (terminal-coding-system))
-       (or enable-multibyte-characters
-           (and (char-table-p standard-display-table)
-                (equal (aref standard-display-table 161) [161])))))
+  (declare (obsolete nil "28.1"))
+  t)
 
 (defun calendar-french-month-name-array ()
   "Return the array of month names, depending on whether accents are 
available."
-  (if (calendar-french-accents-p)
-      calendar-french-multibyte-month-name-array
-    calendar-french-month-name-array))
+  (declare (obsolete "use the variable of the same name instead" "28.1"))
+  calendar-french-month-name-array)
 
 (defun calendar-french-day-name-array ()
   "Return the array of day names."
+  (declare (obsolete "use the variable of the same name instead" "28.1"))
   calendar-french-day-name-array)
 
 (defun calendar-french-special-days-array ()
   "Return the special day names, depending on whether accents are available."
-  (if (calendar-french-accents-p)
-      calendar-french-multibyte-special-days-array
-    calendar-french-special-days-array))
+  (declare (obsolete "use the variable of the same name instead" "28.1"))
+  calendar-french-special-days-array)
 
 (defun calendar-french-leap-year-p (year)
   "True if YEAR is a leap year on the French Revolutionary calendar.
@@ -171,17 +162,13 @@ Defaults to today's date if DATE is not given."
          (d (calendar-extract-day french-date)))
     (cond
      ((< y 1) "")
-     ((= m 13) (format (if (calendar-french-accents-p)
-                           "Jour %s de l'Année %d de la Révolution"
-                         "Jour %s de l'Anne'e %d de la Re'volution")
-                       (aref (calendar-french-special-days-array) (1- d))
+     ((= m 13) (format "Jour %s de l'Année %d de la Révolution"
+                       (aref calendar-french-special-days-array (1- d))
                        y))
      (t (format
-         (if (calendar-french-accents-p)
-             "%d %s an %d de la Révolution"
-           "%d %s an %d de la Re'volution")
+         "%d %s an %d de la Révolution"
          d
-         (aref (calendar-french-month-name-array) (1- m))
+         (aref calendar-french-month-name-array (1- m))
          y)))))
 
 ;;;###cal-autoload
@@ -198,13 +185,11 @@ Defaults to today's date if DATE is not given."
   "Move cursor to French Revolutionary date DATE.
 Echo French Revolutionary date unless NOECHO is non-nil."
   (interactive
-   (let* ((months (calendar-french-month-name-array))
-          (special-days (calendar-french-special-days-array))
+   (let* ((months calendar-french-month-name-array)
+          (special-days calendar-french-special-days-array)
           (year (progn
                   (calendar-read
-                   (if (calendar-french-accents-p)
-                       "Année de la Révolution (>0): "
-                     "Anne'e de la Re'volution (>0): ")
+                   "Année de la Révolution (>0): "
                    (lambda (x) (> x 0))
                    (number-to-string
                     (calendar-extract-year



reply via email to

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