aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2012-11-21 23:31:45 -0800
committerPaul Eggert2012-11-21 23:31:45 -0800
commit2ecb2679ad2f052343479bdaf8b96fa016c1f4cf (patch)
tree61a94a15d3fa085d503c095e06024ce8096917ef
parent6ceeb5f14411ed388979d0bb944c06e36756f9af (diff)
downloademacs-2ecb2679ad2f052343479bdaf8b96fa016c1f4cf.tar.gz
emacs-2ecb2679ad2f052343479bdaf8b96fa016c1f4cf.zip
* calc/calc.el (calc-gregorian-switch): Move to after calc-refresh
definition. This fixes a bootstrap failure.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc.el90
2 files changed, 50 insertions, 45 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 253392fe5b8..cbf80456b0e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-11-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 * calc/calc.el (calc-gregorian-switch): Move to after calc-refresh
4 definition. This fixes a bootstrap failure.
5
12012-11-22 Jay Belanger <jay.p.belanger@gmail.com> 62012-11-22 Jay Belanger <jay.p.belanger@gmail.com>
2 7
3 * calc/calc.el (calc-gregorian-switch): Refresh the Calc buffer 8 * calc/calc.el (calc-gregorian-switch): Refresh the Calc buffer
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 99e40768467..ff4e5d71dce 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -466,51 +466,6 @@ to be identified as that note."
466 466
467(defvar math-format-date-cache) ; calc-forms.el 467(defvar math-format-date-cache) ; calc-forms.el
468 468
469;; Dates that are built-in options for `calc-gregorian-switch' should be
470;; (YEAR MONTH DAY math-date-from-gregorian-dt(YEAR MONTH DAY)) for speed.
471(defcustom calc-gregorian-switch nil
472 "The first day the Gregorian calendar is used by Calc's date forms.
473This is `nil' (the default) if the Gregorian calendar is the only one used.
474Otherwise, it should be a list `(YEAR MONTH DAY)' when Calc begins to use
475the Gregorian calendar; Calc will use the Julian calendar for earlier dates.
476The dates in which different regions of the world began to use the
477Gregorian calendar vary quite a bit, even within a single country.
478If you want Calc's date forms to switch between the Julian and
479Gregorian calendar, you can specify the date or choose from several
480common choices. Some of these choices should be taken with a grain
481of salt; for example different parts of France changed calendars at
482different times, and Sweden's change to the Gregorian calendar was
483complicated. Also, the boundaries of the countries were different at
484the times of the calendar changes than they are now.
485The Vatican decided that the Gregorian calendar should take effect
486on 15 October 1582 (Gregorian), and many Catholic countries made
487the change then. Great Britian and its colonies had the Gregorian
488calendar take effect on 14 September 1752 (Gregorian); this includes
489the United States."
490 :group 'calc
491 :version "24.4"
492 :type '(choice (const :tag "Always use the Gregorian calendar" nil)
493 (const :tag "Great Britian and the US (1752 9 14)" (1752 9 14 639797))
494 (const :tag "Vatican (1582 10 15)" (1582 10 15 577736))
495 (const :tag "Czechoslovakia (1584 1 17)" (1584 1 17 578195))
496 (const :tag "Denmark (1700 3 1)" (1700 3 1 620607))
497 (const :tag "France (1582 12 20)" (1582 12 20 577802))
498 (const :tag "Hungary (1587 11 1)" (1587 11 1 579579))
499 (const :tag "Luxemburg (1582 12 25)" (1582 12 25 577807))
500 (const :tag "Romania (1919 4 14)" (1919 4 14 700638))
501 (const :tag "Russia (1918 2 14)" (1918 2 14 700214))
502 (const :tag "Sweden (1753 3 1)" (1753 3 1 639965))
503 (const :tag "Switzerland (Catholic) (1584 1 22)" (1584 1 22 578200))
504 (const :tag "Switzerland (Protestant) (1701 1 12)" (1701 1 12 620924))
505 (list :tag "(YEAR MONTH DAY)"
506 (integer :tag "Year")
507 (integer :tag "Month (integer)")
508 (integer :tag "Day")))
509 :set (lambda (symbol value)
510 (set-default symbol value)
511 (setq math-format-date-cache nil)
512 (calc-refresh)))
513
514(defface calc-nonselected-face 469(defface calc-nonselected-face
515 '((t :inherit shadow 470 '((t :inherit shadow
516 :slant italic)) 471 :slant italic))
@@ -2067,6 +2022,51 @@ See calc-keypad for details."
2067 (calc-refresh align))) 2022 (calc-refresh align)))
2068 (setq calc-refresh-count (1+ calc-refresh-count))) 2023 (setq calc-refresh-count (1+ calc-refresh-count)))
2069 2024
2025;; Dates that are built-in options for `calc-gregorian-switch' should be
2026;; (YEAR MONTH DAY math-date-from-gregorian-dt(YEAR MONTH DAY)) for speed.
2027(defcustom calc-gregorian-switch nil
2028 "The first day the Gregorian calendar is used by Calc's date forms.
2029This is `nil' (the default) if the Gregorian calendar is the only one used.
2030Otherwise, it should be a list `(YEAR MONTH DAY)' when Calc begins to use
2031the Gregorian calendar; Calc will use the Julian calendar for earlier dates.
2032The dates in which different regions of the world began to use the
2033Gregorian calendar vary quite a bit, even within a single country.
2034If you want Calc's date forms to switch between the Julian and
2035Gregorian calendar, you can specify the date or choose from several
2036common choices. Some of these choices should be taken with a grain
2037of salt; for example different parts of France changed calendars at
2038different times, and Sweden's change to the Gregorian calendar was
2039complicated. Also, the boundaries of the countries were different at
2040the times of the calendar changes than they are now.
2041The Vatican decided that the Gregorian calendar should take effect
2042on 15 October 1582 (Gregorian), and many Catholic countries made
2043the change then. Great Britian and its colonies had the Gregorian
2044calendar take effect on 14 September 1752 (Gregorian); this includes
2045the United States."
2046 :group 'calc
2047 :version "24.4"
2048 :type '(choice (const :tag "Always use the Gregorian calendar" nil)
2049 (const :tag "Great Britian and the US (1752 9 14)" (1752 9 14 639797))
2050 (const :tag "Vatican (1582 10 15)" (1582 10 15 577736))
2051 (const :tag "Czechoslovakia (1584 1 17)" (1584 1 17 578195))
2052 (const :tag "Denmark (1700 3 1)" (1700 3 1 620607))
2053 (const :tag "France (1582 12 20)" (1582 12 20 577802))
2054 (const :tag "Hungary (1587 11 1)" (1587 11 1 579579))
2055 (const :tag "Luxemburg (1582 12 25)" (1582 12 25 577807))
2056 (const :tag "Romania (1919 4 14)" (1919 4 14 700638))
2057 (const :tag "Russia (1918 2 14)" (1918 2 14 700214))
2058 (const :tag "Sweden (1753 3 1)" (1753 3 1 639965))
2059 (const :tag "Switzerland (Catholic) (1584 1 22)" (1584 1 22 578200))
2060 (const :tag "Switzerland (Protestant) (1701 1 12)" (1701 1 12 620924))
2061 (list :tag "(YEAR MONTH DAY)"
2062 (integer :tag "Year")
2063 (integer :tag "Month (integer)")
2064 (integer :tag "Day")))
2065 :set (lambda (symbol value)
2066 (set-default symbol value)
2067 (setq math-format-date-cache nil)
2068 (calc-refresh)))
2069
2070;;;; The Calc Trail buffer. 2070;;;; The Calc Trail buffer.
2071 2071
2072(defun calc-check-trail-aligned () 2072(defun calc-check-trail-aligned ()