;ELC ;;; compiled by jwz@thalidomide on Mon Jan 3 17:53:02 1994 ;;; from file /th/jwz/emacs19/lisp/calendar/calendar.el ;;; emacs version 19.9 Lucid (beta12). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (byte-code "‡" ["Version 5.2, released October 20, 1993" calendar-version nil] 1) (defvar calendar-week-start-day 0 "\ *The day of the week on which a week in the calendar begins. 0 means Sunday (default), 1 means Monday, and so on.") (defvar view-diary-entries-initially nil "\ *If t, the diary entries for the current date will be displayed on entry. The diary is displayed in another window when the calendar is first displayed, if the current date is visible. The number of days of diary entries displayed is governed by the variable `number-of-diary-entries'.") (defvar number-of-diary-entries 1 "\ *Specifies how many days of diary entries are to be displayed initially. This variable affects the diary display when the command M-x diary is used, or if the value of the variable `view-diary-entries-initially' is t. For example, if the default value 1 is used, then only the current day's diary entries will be displayed. If the value 2 is used, then both the current day's and the next day's entries will be displayed. The value can also be a vector such as [0 2 2 2 2 4 1]; this value will cause no diary entries to be displayed on Sunday, the current date's and the next day's diary entries to be displayed Monday through Thursday, Friday through Monday's entries to be displayed on Friday, and only Saturday's entries to be displayed on Saturday. This variable does not affect the diary display with the `d' command from the calendar; in that case, the prefix argument controls the number of days of diary entries displayed.") (defvar mark-diary-entries-in-calendar nil "\ *If t, dates with diary entries will be marked in the calendar window. The marking symbol is specified by the variable `diary-entry-marker'.") (defvar diary-entry-marker (purecopy "+") "\ *The symbol used to mark dates that have diary entries.") (defvar view-calendar-holidays-initially nil "\ *If t, holidays for current three month period will be displayed on entry. The holidays are displayed in another window when the calendar is first displayed.") (defvar mark-holidays-in-calendar nil "\ *If t, dates of holidays will be marked in the calendar window. The marking symbol is specified by the variable `calendar-holiday-marker'.") (defvar calendar-holiday-marker (purecopy "*") "\ *The symbol used to mark notable dates in the calendar.") (defvar all-hebrew-calendar-holidays nil "\ *If nil, show only major holidays from the Hebrew calendar. If nil, the only holidays from the Hebrew calendar shown will be those days of such major interest as to appear on secular calendars. If t, the holidays shown in the calendar will include all special days that would be shown on a complete Hebrew calendar.") (defvar all-christian-calendar-holidays nil "\ *If nil, show only major holidays from the Christian calendar. If nil, the only holidays from the Christian calendar shown will be those days of such major interest as to appear on secular calendars. If t, the holidays shown in the calendar will include all special days that would be shown on a complete Christian calendar.") (defvar all-islamic-calendar-holidays nil "\ *If nil, show only major holidays from the Islamic calendar. If nil, the only holidays from the Islamic calendar shown will be those days of such major interest as to appear on secular calendars. If t, the holidays shown in the calendar will include all special days that would be shown on a complete Islamic calendar.") (defvar calendar-load-hook nil "\ *List of functions to be called after the calendar is first loaded. This is the place to add key bindings to calendar-mode-map.") (defvar initial-calendar-window-hook nil "\ *List of functions to be called when the calendar window is first opened. The functions invoked are called after the calendar window is opened, but once opened is never called again. Leaving the calendar with the `q' command and reentering it will cause these functions to be called again.") (defvar today-visible-calendar-hook nil "\ *List of functions called whenever the current date is visible. This can be used, for example, to replace today's date with asterisks; a function `calendar-star-date' is included for this purpose: (setq today-visible-calendar-hook 'calendar-star-date) It could also be used to mark the current date with `='; a function is also provided for this: (setq today-visible-calendar-hook 'calendar-mark-today) The corresponding variable `today-invisible-calendar-hook' is the list of functions called when the calendar function was called when the current date is not visible in the window. Other than the use of the provided functions, the changing of any characters in the calendar buffer by the hooks may cause the failure of the functions that move by days and weeks.") (defvar today-invisible-calendar-hook nil "\ *List of functions called whenever the current date is not visible. The corresponding variable `today-visible-calendar-hook' is the list of functions called when the calendar function was called when the current date is visible in the window. Other than the use of the provided functions, the changing of any characters in the calendar buffer by the hooks may cause the failure of the functions that move by days and weeks.") (defvar diary-file (purecopy "~/diary") "\ *Name of the file in which one's personal diary of dates is kept. The file's entries are lines in any of the forms MONTH/DAY MONTH/DAY/YEAR MONTHNAME DAY MONTHNAME DAY, YEAR DAYNAME at the beginning of the line; the remainder of the line is the diary entry string for that date. MONTH and DAY are one or two digit numbers, YEAR is a number and may be written in full or abbreviated to the final two digits. If the date does not contain a year, it is generic and applies to any year. DAYNAME entries apply to any date on which is on that day of the week. MONTHNAME and DAYNAME can be spelled in full, abbreviated to three characters (with or without a period), capitalized or not. Any of DAY, MONTH, or MONTHNAME, YEAR can be `*' which matches any day, month, or year, respectively. The European style (in which the day precedes the month) can be used instead, if you execute `european-calendar' when in the calendar, or set `european-calendar-style' to t in your .emacs file. The European forms are DAY/MONTH DAY/MONTH/YEAR DAY MONTHNAME DAY MONTHNAME YEAR DAYNAME To revert to the default American style from the European style, execute `american-calendar' in the calendar. A diary entry can be preceded by a diary-nonmarking-symbol (ordinarily `&') to make that entry nonmarking--that is, it will not be marked on dates in the calendar window but will appear in a diary window. Multiline diary entries are made by indenting lines after the first with either a TAB or one or more spaces. Lines not in one the above formats are ignored. Here are some sample diary entries (in the default American style): 12/22/1988 Twentieth wedding anniversary!! &1/1. Happy New Year! 10/22 Ruth's birthday. 21: Payday Tuesday--weekly meeting with grad students at 10am Supowit, Shen, Bitner, and Kapoor to attend. 1/13/89 Friday the thirteenth!! &thu 4pm squash game with Lloyd. mar 16 Dad's birthday April 15, 1989 Income tax due. &* 15 time cards due. If the first line of a diary entry consists only of the date or day name with no trailing blanks or punctuation, then that line will not be displayed in the diary window; only the continuation lines will be shown. For example, the single diary entry 02/11/1989 Bill Blattner visits Princeton today 2pm Cognitive Studies Committee meeting 2:30-5:30 Lizzie at Lawrenceville for `Group Initiative' 4:00pm Jamie Tappenden 7:30pm Dinner at George and Ed's for Alan Ryan 7:30-10:00pm dance at Stewart Country Day School will appear in the diary window without the date line at the beginning. This facility allows the diary window to look neater, but can cause confusion if used with more than one day's entries displayed. Diary entries can be based on Lisp sexps. For example, the diary entry %%(diary-block 11 1 1990 11 10 1990) Vacation causes the diary entry \"Vacation\" to appear from November 1 through November 10, 1990. Other functions available are `diary-float', `diary-anniversary', `diary-cyclic', `diary-day-of-year', `diary-iso-date', `diary-french-date', `diary-hebrew-date', `diary-islamic-date', `diary-mayan-date', `diary-yahrzeit', `diary-sunrise-sunset', `diary-phases-of-moon', `diary-parasha', `diary-omer', `diary-rosh-hodesh', and `diary-sabbath-candles'. See the documentation for the function `list-sexp-diary-entries' for more details. Diary entries based on the Hebrew and/or the Islamic calendar are also possible, but because these are somewhat slow, they are ignored unless you set the `nongregorian-diary-listing-hook' and the `nongregorian-diary-marking-hook' appropriately. See the documentation for these functions for details. Diary files can contain directives to include the contents of other files; for details, see the documentation for the variable `list-diary-entries-hook'.") (defvar diary-nonmarking-symbol (purecopy "&") "\ *Symbol indicating that a diary entry is not to be marked in the calendar.") (defvar hebrew-diary-entry-symbol (purecopy "H") "\ *Symbol indicating a diary entry according to the Hebrew calendar.") (defvar islamic-diary-entry-symbol (purecopy "I") "\ *Symbol indicating a diary entry according to the Islamic calendar.") (defvar diary-include-string (purecopy "#include") "\ *The string indicating inclusion of another file of diary entries. See the documentation for the function `include-other-diary-files'.") (defvar sexp-diary-entry-symbol (purecopy "%%") "\ *The string used to indicate a sexp diary entry in diary-file. See the documentation for the function `list-sexp-diary-entries'.") (defvar abbreviated-calendar-year t "\ *Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. For the Gregorian calendar; similarly for the Hebrew and Islamic calendars. If this variable is nil, years must be written in full.") (defvar european-calendar-style nil "\ *Use the European style of dates in the diary and in any displays. If this variable is t, a date 1/2/1990 would be interpreted as February 1, 1990. The accepted European date styles are DAY/MONTH DAY/MONTH/YEAR DAY MONTHNAME DAY MONTHNAME YEAR DAYNAME Names can be capitalized or not, written in full, or abbreviated to three characters with or without a period.") (defvar american-date-diary-pattern (purecopy '((month "/" day "[^/0-9]") (month "/" day "/" year "[^0-9]") (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W"))) "\ *List of pseudo-patterns describing the American patterns of date used. See the documentation of diary-date-forms for an explanation.") (defvar european-date-diary-pattern (purecopy '((day "/" month "[^/0-9]") (day "/" month "/" year "[^0-9]") (backup day " *" monthname "\\W+\\<[^*0-9]") (day " *" monthname " *" year "[^0-9]") (dayname "\\W"))) "\ *List of pseudo-patterns describing the European patterns of date used. See the documentation of diary-date-forms for an explanation.") (defvar diary-date-forms (byte-code " \n" [european-calendar-style european-date-diary-pattern american-date-diary-pattern] 1) "\ *List of pseudo-patterns describing the forms of date used in the diary. The patterns on the list must be MUTUALLY EXCLUSIVE and must should not match any portion of the diary entry itself, just the date component. A pseudo-pattern is a list of regular expressions and the keywords `month', `day', `year', `monthname', and `dayname'. The keyword `monthname' will match the name of the month, capitalized or not, or its three-letter abbreviation, followed by a period or not; it will also match `*'. Similarly, `dayname' will match the name of the day, capitalized or not, or its three-letter abbreviation, followed by a period or not. The keywords `month', `day', and `year' will match those numerical values, preceded by arbitrarily many zeros; they will also match `*'. The matching of the diary entries with the date forms is done with the standard syntax table from Fundamental mode, but with the `*' changed so that it is a word constituent. If, to be mutually exclusive, a pseudo-pattern must match a portion of the diary entry itself, the first element of the pattern MUST be `backup'. This directive causes the date recognizer to back up to the beginning of the current word of the diary entry, so in no case can the pattern match more than a portion of the first word of the diary entry.") (defvar european-calendar-display-form (purecopy '((if dayname (concat dayname ", ")) day " " monthname " " year)) "\ *Pseudo-pattern governing the way a date appears in the European style. See the documentation of calendar-date-display-form for an explanation.") (defvar american-calendar-display-form (purecopy '((if dayname (concat dayname ", ")) monthname " " day ", " year)) "\ *Pseudo-pattern governing the way a date appears in the American style. See the documentation of calendar-date-display-form for an explanation.") (defvar calendar-date-display-form (byte-code " \n" [european-calendar-style european-calendar-display-form american-calendar-display-form] 1) "\ *Pseudo-pattern governing the way a date appears. Used by the function `calendar-date-string', a pseudo-pattern is a list of expressions that can involve the keywords `month', `day', and `year', all numbers in string form, and `monthname' and `dayname', both alphabetic strings. For example, the ISO standard would use the pseudo- pattern '(year \"-\" month \"-\" day) while a typical American form would be '(month \"/\" day \"/\" (substring year -2)) and '((format \"%9s, %9s %2s, %4s\" dayname monthname day year)) would give the usual American style in fixed-length fields. See the documentation of the function `calendar-date-string'.") (fset 'european-calendar #[nil "\n  " [t european-calendar-style european-calendar-display-form calendar-date-display-form european-date-diary-pattern diary-date-forms update-calendar-mode-line] 1 "\ Set the interpretation and display of dates to the European style." nil]) (fset 'american-calendar #[nil "\n  " [nil european-calendar-style american-calendar-display-form calendar-date-display-form american-date-diary-pattern diary-date-forms update-calendar-mode-line] 1 "\ Set the interpretation and display of dates to the American style." nil]) (defvar print-diary-entries-hook 'lpr-buffer "\ *List of functions called after a temporary diary buffer is prepared. The buffer shows only the diary entries currently visible in the diary buffer. The default just does the printing. Other uses might include, for example, rearranging the lines into order by day and time, saving the buffer instead of deleting it, or changing the function used to do the printing.") (defvar list-diary-entries-hook nil "\ *List of functions called after diary file is culled for relevant entries. It is to be used for diary entries that are not found in the diary file. A function `include-other-diary-files' is provided for use as the value of this hook. This function enables you to use shared diary files together with your own. The files included are specified in the diary-file by lines of the form #include \"filename\" This is recursive; that is, #include directives in files thus included are obeyed. You can change the \"#include\" to some other string by changing the variable `diary-include-string'. When you use `include-other-diary-files' as part of the list-diary-entries-hook, you will probably also want to use the function `mark-included-diary-files' as part of the mark-diary-entries-hook. For example, you could use (setq list-diary-entries-hook '(include-other-diary-files sort-diary-entries)) (setq diary-display-hook 'fancy-diary-display) in your .emacs file to cause the fancy diary buffer to be displayed with diary entries from various included files, each day's entries sorted into lexicographic order.") (defvar diary-hook nil "\ *List of functions called after the display of the diary. Can be used for appointment notification.") (defvar diary-display-hook nil "\ *List of functions that handle the display of the diary. If nil (the default), `simple-diary-display' will be used. Use `ignore' for no diary display. Ordinarily, this just displays the diary buffer (with holidays indicated in the mode line), if there are any relevant entries. At the time these functions are called, the variable `diary-entries-list' is a list, in order by date, of all relevant diary entries in the form of ((MONTH DAY YEAR) STRING), where string is the diary entry for the given date. This can be used, for example, a different buffer for display (perhaps combined with holidays), or produce hard copy output. A function `fancy-diary-display' is provided as an alternative choice for this hook; this function prepares a special noneditable diary buffer with the relevant diary entries that has neat day-by-day arrangement with headings. The fancy diary buffer will show the holidays unless the variable `holidays-in-diary-buffer' is set to nil. Ordinarily, the fancy diary buffer will not show days for which there are no diary entries, even if that day is a holiday; if you want such days to be shown in the fancy diary buffer, set the variable `diary-list-include-blanks' to t.") (defvar nongregorian-diary-listing-hook nil "\ *List of functions called for listing diary file and included files. As the files are processed for diary entries, these functions are used to cull relevant entries. You can use either or both of `list-hebrew-diary-entries' and `list-islamic-diary-entries'. The documentation for these functions describes the style of such diary entries.") (defvar mark-diary-entries-hook nil "\ *List of functions called after marking diary entries in the calendar. A function `mark-included-diary-files' is also provided for use as the mark-diary-entries-hook; it enables you to use shared diary files together with your own. The files included are specified in the diary-file by lines of the form #include \"filename\" This is recursive; that is, #include directives in files thus included are obeyed. You can change the \"#include\" to some other string by changing the variable `diary-include-string'. When you use `mark-included-diary-files' as part of the mark-diary-entries-hook, you will probably also want to use the function `include-other-diary-files' as part of the list-diary-entries-hook.") (defvar nongregorian-diary-marking-hook nil "\ *List of functions called for marking diary file and included files. As the files are processed for diary entries, these functions are used to cull relevant entries. You can use either or both of `mark-hebrew-diary-entries' and `mark-islamic-diary-entries'. The documentation for these functions describes the style of such diary entries.") (defvar diary-list-include-blanks nil "\ *If nil, do not include days with no diary entry in the list of diary entries. Such days will then not be shown in the the fancy diary buffer, even if they are holidays.") (defvar holidays-in-diary-buffer t "\ *If t, the holidays will be indicated in the diary display. The holidays will be given in the mode line of the diary buffer, or in the fancy diary buffer next to the date. This slows down the diary functions somewhat; setting it to nil will make the diary display faster.") (byte-code "!‡" [boundp calendar-mark-ring nil] 2) (defvar general-holidays (purecopy '((holiday-fixed 1 1 "New Year's Day") (holiday-float 1 1 3 "Martin Luther King Day") (holiday-fixed 2 2 "Ground Hog Day") (holiday-fixed 2 14 "Valentine's Day") (holiday-float 2 1 3 "President's Day") (holiday-fixed 3 17 "St. Patrick's Day") (holiday-fixed 4 1 "April Fool's Day") (holiday-float 5 0 2 "Mother's Day") (holiday-float 5 1 -1 "Memorial Day") (holiday-fixed 6 14 "Flag Day") (holiday-float 6 0 3 "Father's Day") (holiday-fixed 7 4 "Independence Day") (holiday-float 9 1 1 "Labor Day") (holiday-float 10 1 2 "Columbus Day") (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving"))) "\ *General holidays. Default value is for the United States. See the documentation for `calendar-holidays' for details.") (defvar local-holidays nil "\ *Local holidays. See the documentation for `calendar-holidays' for details.") (defvar other-holidays nil "\ *User defined holidays. See the documentation for `calendar-holidays' for details.") (byte-code "!!!!!!!" [boundp hebrew-holidays-1 purecopy ((holiday-rosh-hashanah-etc) (if all-hebrew-calendar-holidays (holiday-julian 11 (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (if (zerop (% (1+ year) 4)) 22 21))) "\"Tal Umatar\" (evening)"))) hebrew-holidays-2 ((if all-hebrew-calendar-holidays (holiday-hanukkah) (holiday-hebrew 9 25 "Hanukkah")) (if all-hebrew-calendar-holidays (holiday-hebrew 10 (let ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list displayed-month 28 displayed-year)))))) (if (= (% (calendar-absolute-from-hebrew (list 10 10 h-year)) 7) 6) 11 10)) "Tzom Teveth")) (if all-hebrew-calendar-holidays (holiday-hebrew 11 15 "Tu B'Shevat"))) hebrew-holidays-3 ((if all-hebrew-calendar-holidays (holiday-hebrew 11 (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (let* ((h-year (extract-calendar-year (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))) (s-s (calendar-hebrew-from-absolute (if (= (% (calendar-absolute-from-hebrew (list 7 1 h-year)) 7) 6) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 17 h-year))) (calendar-dayname-on-or-before 6 (calendar-absolute-from-hebrew (list 11 16 h-year)))))) (day (extract-calendar-day s-s))) day)) "Shabbat Shirah"))) hebrew-holidays-4 ((holiday-passover-etc) (if (and all-hebrew-calendar-holidays (let* ((m displayed-month) (y displayed-year) (year)) (increment-calendar-month m y -1) (let ((year (extract-calendar-year (calendar-julian-from-absolute (calendar-absolute-from-gregorian (list m 1 y)))))) (= 21 (% year 28))))) (holiday-julian 3 26 "Kiddush HaHamah")) (if all-hebrew-calendar-holidays (holiday-tisha-b-av-etc)))] 2) (defvar hebrew-holidays (byte-code "\n $!" [purecopy append hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4] 6) "\ *Jewish holidays. See the documentation for `calendar-holidays' for details.") (defvar christian-holidays (purecopy '((if all-christian-calendar-holidays (holiday-fixed 1 6 "Epiphany")) (holiday-easter-etc) (if all-christian-calendar-holidays (holiday-greek-orthodox-easter)) (if all-christian-calendar-holidays (holiday-fixed 8 15 "Assumption")) (if all-christian-calendar-holidays (holiday-advent)) (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays (holiday-julian 12 25 "Eastern Orthodox Christmas")))) "\ *Christian holidays. See the documentation for `calendar-holidays' for details.") (defvar islamic-holidays (purecopy '((holiday-islamic 1 1 (format "Islamic New Year %d" (let ((m displayed-month) (y displayed-year)) (increment-calendar-month m y 1) (extract-calendar-year (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (list m (calendar-last-day-of-month m y) y))))))) (if all-islamic-calendar-holidays (holiday-islamic 1 10 "Ashura")) (if all-islamic-calendar-holidays (holiday-islamic 3 12 "Mulad-al-Nabi")) (if all-islamic-calendar-holidays (holiday-islamic 7 26 "Shab-e-Mi'raj")) (if all-islamic-calendar-holidays (holiday-islamic 8 15 "Shab-e-Bara't")) (holiday-islamic 9 1 "Ramadan Begins") (if all-islamic-calendar-holidays (holiday-islamic 9 27 "Shab-e Qadr")) (if all-islamic-calendar-holidays (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays (holiday-islamic 12 10 "Id-al-Adha")))) "\ *Islamic holidays. See the documentation for `calendar-holidays' for details.") (defvar solar-holidays (purecopy '((if (fboundp 'atan) (solar-equinoxes-solstices)) (if (progn (require 'cal-dst) t) (funcall 'holiday-sexp calendar-daylight-savings-starts '(format "Daylight Savings Time Begins %s" (if (fboundp 'atan) (solar-time-string (/ calendar-daylight-savings-starts-time (float 60)) date 'standard) "")))) (funcall 'holiday-sexp calendar-daylight-savings-ends '(format "Daylight Savings Time Ends %s" (if (fboundp 'atan) (solar-time-string (/ (- calendar-daylight-savings-ends-time calendar-daylight-time-offset) (float 60)) date 'daylight) ""))))) "\ *Sun-related holidays. See the documentation for `calendar-holidays' for details.") (defvar calendar-holidays (byte-code "\n &!" [purecopy append general-holidays local-holidays other-holidays christian-holidays hebrew-holidays islamic-holidays solar-holidays] 9) "\ *List of notable days for the command M-x holidays. Additional holidays are easy to add to the list, just put them in the list `other-holidays' in your .emacs file. Similarly, by setting any of `general-holidays', `local-holidays' `christian-holidays', `hebrew-holidays', `islamic-holidays', or `solar-holidays' to nil in your .emacs file, you can eliminate unwanted categories of holidays. The intention is that (in the US) `local-holidays' be set in site-init.el and `other-holidays' be set by the user. Entries on the list are expressions that return (possibly empty) lists of items of the form ((month day year) string) of a holiday in the in the three-month period centered around `displayed-month' of `displayed-year'. Several basic functions are provided for this purpose: (holiday-fixed MONTH DAY STRING) is a fixed date on the Gregorian calendar (holiday-float MONTH DAYNAME K STRING &optional day) is the Kth DAYNAME in MONTH on the Gregorian calendar (0 for Sunday, etc.); K<0 means count back from the end of the month. An optional parameter DAY means the Kth DAYNAME after/before MONTH DAY. (holiday-hebrew MONTH DAY STRING) a fixed date on the Hebrew calendar (holiday-islamic MONTH DAY STRING) a fixed date on the Islamic calendar (holiday-julian MONTH DAY STRING) a fixed date on the Julian calendar (holiday-sexp SEXP STRING) SEXP is a Gregorian-date-valued expression in the variable `year'; if it evaluates to a visible date, that's the holiday; if it evaluates to nil, there's no holiday. STRING is an expression in the variable `date'. For example, to add Bastille Day, celebrated in France on July 14, add (holiday-fixed 7 14 \"Bastille Day\") to the list. To add Hurricane Supplication Day, celebrated in the Virgin Islands on the fourth Monday in August, add (holiday-float 8 1 4 \"Hurricane Supplication Day\") to the list (the last Monday would be specified with `-1' instead of `4'). To add the last day of Hanukkah to the list, use (holiday-hebrew 10 2 \"Last day of Hanukkah\") since the Hebrew months are numbered with 1 starting from Nisan, while to add the Islamic feast celebrating Mohammed's birthday use (holiday-islamic 3 12 \"Mohammed's Birthday\") since the Islamic months are numbered from 1 starting with Muharram. To add Thomas Jefferson's birthday, April 2, 1743 (Julian), use (holiday-julian 4 2 \"Jefferson's Birthday\") To include a holiday conditionally, use the sexp form or a conditional. For example, to include American presidential elections, which occur on the first Tuesday after the first Monday in November of years divisible by 4, add (holiday-sexp (if (zerop (% year 4)) (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before 1 (+ 6 (calendar-absolute-from-gregorian (list 11 1 year))))))) \"US Presidential Election\") or (if (zerop (% displayed-year 4)) (holiday-fixed 11 (extract-calendar-day (calendar-gregorian-from-absolute (1+ (calendar-dayname-on-or-before 1 (+ 6 (calendar-absolute-from-gregorian (list 11 1 displayed-year))))))) \"US Presidential Election\")) to the list. To include the phases of the moon, add (lunar-phases) to the holiday list, where `lunar-phases' is an Emacs-Lisp function that you've written to return a (possibly empty) list of the relevant VISIBLE dates with descriptive strings such as (((2 6 1989) \"New Moon\") ((2 12 1989) \"First Quarter Moon\") ... ).") (defconst calendar-buffer "*Calendar*" "\ Name of the buffer used for the calendar.") (defconst holiday-buffer "*Holidays*" "\ Name of the buffer used for the displaying the holidays.") (defconst fancy-diary-buffer "*Fancy Diary Entries*" "\ Name of the buffer used for the optional fancy display of the diary.") (fset 'increment-calendar-month '(macro . #[(mon yr n) " EDCE EF" [let macro-y + * yr 12 mon -1 n setq (1+ (% macro-y 12)) (/ macro-y 12)] 7 "\ Move the variables MON and YR to the month and year by N months. Forward if N is positive or backward if N is negative."])) (fset 'calendar-for-loop '(macro . #[(var from init to final do &rest body) " DDC DEED\n\"E" [let var 1- init append while >= final setq 1+ body] 10 "\ Execute a for loop."])) (fset 'calendar-sum '(macro . #[(index initial condition expression) " \nDD  EE DEFF" [let index initial (sum 0) while condition setq sum + expression 1+] 9 "\ For INDEX = INITIAL et seq, as long as CONDITION holds, sum EXPRESSION."])) (fset 'extract-calendar-month '(macro . #[(date) " D" [car date] 2 "\ Extract the month part of DATE which has the form (month day year)."])) (fset 'extract-calendar-day '(macro . #[(date) "\nDD" [car cdr date] 3 "\ Extract the day part of DATE which has the form (month day year)."])) (fset 'extract-calendar-year '(macro . #[(date) "\nDDD" [car cdr date] 4 "\ Extract the year part of DATE which has the form (month day year)."])) (fset 'calendar-leap-year-p '(macro . #[(year) " ED EDD EDEE" [and zerop % year 4 or not 100 400] 8 "\ Returns t if YEAR is a Gregorian leap year."])) (fset 'calendar-last-day-of-month '(macro . #[(month year) " ED!E DEF" [if and = month 2 macroexpand calendar-leap-year-p year 29 aref [31 28 31 30 31 30 31 31 30 31 30 31] 1-] 7 "\ The last day in MONTH during YEAR."])) (fset 'calendar-day-number '(macro . #[(date) " D!D D!D D!DF!EEEF" [let* month macroexpand extract-calendar-month date day extract-calendar-day year extract-calendar-year (day-of-year (+ day (* 31 (1- month)))) if (> month 2) progn (setq day-of-year (- day-of-year (/ (+ 23 (* 4 month)) 10))) (calendar-leap-year-p year) (setq day-of-year (1+ day-of-year)) day-of-year] 9 "\ Return the day number within the year of the date DATE. For example, (calendar-day-number '(1 1 1987)) returns the value 1, while (calendar-day-number '(12 31 1980)) returns 366."])) (fset 'calendar-absolute-from-gregorian '(macro . #[(date) " D!DDC D!C#E" [let prior-years 1- macroexpand extract-calendar-year date append (+) calendar-day-number ((* 365 prior-years) (/ prior-years 4) (- (/ prior-years 100)) (/ prior-years 400))] 7 "\ The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The Gregorian date Sunday, December 31, 1 BC is imaginary."])) (fset 'calendar #[(&optional arg) " !q    \"\"$!!\"A @  AA@!# AA@ !\" !#!# !H#!.&!''!)ꪁ + +!" [get-buffer-create calendar-buffer calendar-mode current-window-configuration calendar-window-configuration t completion-ignore-case pop-up-windows 1000 split-height-threshold calendar-current-date date arg assoc capitalize completing-read "Month name: " mapcar list append calendar-month-name-array nil calendar-make-alist month calendar-read "Year (>0): " (lambda (x) (> x 0)) int-to-string year pop-to-buffer generate-calendar-window view-diary-entries-initially calendar-date-is-visible-p view-diary-entries vectorp number-of-diary-entries calendar-day-of-week get-file-buffer diary-file diary-buffer get-buffer-window diary-window 2 view-calendar-holidays-initially list-calendar-holidays run-hooks initial-calendar-window-hook] 10 "\ Display a three-month calendar in another window. The three months appear side by side, with the current month in the middle surrounded by the previous and next months. The cursor is put on today's date. If called with an optional prefix argument, prompts for month and year. This function is suitable for execution in a .emacs file; appropriate setting of the variable `view-diary-entries-initially' will cause the diary entries for the current date to be displayed in another window. The value of the variable `number-of-diary-entries' controls the number of days of diary entries displayed upon initial display of the calendar. An optional prefix argument ARG causes the calendar displayed to be ARG months in the future if ARG is positive or in the past if ARG is negative; in this case the cursor goes on the first day of the month. Once in the calendar window, future or past months can be moved into view. Arbitrary months can be displayed, or the calendar can be scrolled forward or backward. The cursor can be moved forward or backward by one day, one week, one month, or one year. All of these commands take prefix arguments which, when negative, cause movement in the opposite direction. For convenience, the digit keys and the minus sign are automatically prefixes. The window is replotted as necessary to display the desired date. Diary entries can be marked on the calendar or displayed in another window. Use M-x describe-mode for details of the key bindings in the calendar window. The Gregorian calendar is assumed. After loading the calendar, the hooks given by the variable `calendar-load-hook' are run. This the place to add key bindings to the calendar-mode-map. After preparing the calendar window initially, the hooks given by the variable `initial-calendar-window-hook' are run. The hooks given by the variable `today-visible-calendar-hook' are run everytime the calendar window gets scrolled, if the current date is visible in the window. If it is not visible, the hooks given by the variable `today-invisible-calendar-hook' are run. Thus, for example, setting `today-visible-calendar-hook' to 'calendar-star-date will cause today's date to be replaced by asterisks to highlight it whenever it is in the window." "P"]) (autoload 'view-diary-entries "diary" "\ Prepare and display a buffer with diary entries. Searches the file diary-file for entries that match ARG days starting with the date indicated by the cursor position in the displayed three-month calendar." t) (autoload 'calendar-sunrise-sunset "solar" "\ Local time of sunrise and sunset for date under cursor." t) (autoload 'calendar-phases-of-moon "lunar" "\ Create a buffer of the phases of the moon for the current calendar window." t) (autoload 'calendar-print-french-date "cal-french" "\ Show the French Revolutionary calendar equivalent of the date under the cursor." t) (autoload 'calendar-goto-french-date "cal-french" "\ Move cursor to French Revolutionary date." t) (autoload 'calendar-print-mayan-date "cal-mayan" "\ Show the Mayan long count, Tzolkin, and Haab equivalents of the date under the cursor." t) (autoload 'calendar-goto-mayan-long-count-date "cal-mayan" "\ Move cursor to Mayan long count date." t) (autoload 'calendar-next-haab-date "cal-mayan" "\ Move cursor to next instance of Mayan Haab date." t) (autoload 'calendar-previous-haab-date "cal-mayan" "\ Move cursor to previous instance of Mayan Haab date." t) (autoload 'calendar-next-tzolkin-date "cal-mayan" "\ Move cursor to next instance of Mayan Tzolkin date." t) (autoload 'calendar-previous-tzolkin-date "cal-mayan" "\ Move cursor to previous instance of Mayan Tzolkin date." t) (autoload 'calendar-next-calendar-round-date "cal-mayan" "\ Move cursor to next instance of Mayan Haab/Tzoklin combination." t) (autoload 'calendar-previous-calendar-round-date "cal-mayan" "\ Move cursor to previous instance of Mayan Haab/Tzoklin combination." t) (autoload 'show-all-diary-entries "diary" "\ Show all of the diary entries in the diary-file. This function gets rid of the selective display of the diary-file so that all entries, not just some, are visible. If there is no diary buffer, one is created." t) (autoload 'mark-diary-entries "diary" "\ Mark days in the calendar window that have diary entries. Each entry in diary-file visible in the calendar window is marked." t) (autoload 'insert-diary-entry "diary-ins" "\ Insert a diary entry for the date indicated by point." t) (autoload 'insert-weekly-diary-entry "diary-ins" "\ Insert a weekly diary entry for the day of the week indicated by point." t) (autoload 'insert-monthly-diary-entry "diary-ins" "\ Insert a monthly diary entry for the day of the month indicated by point." t) (autoload 'insert-yearly-diary-entry "diary-ins" "\ Insert an annual diary entry for the day of the year indicated by point." t) (autoload 'insert-anniversary-diary-entry "diary-ins" "\ Insert an anniversary diary entry for the date indicated by point." t) (autoload 'insert-block-diary-entry "diary-ins" "\ Insert a block diary entry for the dates indicated by point and mark." t) (autoload 'insert-cyclic-diary-entry "diary-ins" "\ Insert a cyclic diary entry starting at the date indicated by point." t) (autoload 'insert-hebrew-diary-entry "diary-ins" "\ Insert a diary entry for the Hebrew date corresponding to the date indicated by point." t) (autoload 'insert-monthly-hebrew-diary-entry "diary-ins" "\ Insert a monthly diary entry for the day of the Hebrew month corresponding to the date indicated by point." t) (autoload 'insert-yearly-hebrew-diary-entry "diary-ins" "\ Insert an annual diary entry for the day of the Hebrew year corresponding to the date indicated by point." t) (autoload 'insert-islamic-diary-entry "diary-ins" "\ Insert a diary entry for the Islamic date corresponding to the date indicated by point." t) (autoload 'insert-monthly-islamic-diary-entry "diary-ins" "\ Insert a monthly diary entry for the day of the Islamic month corresponding to the date indicated by point." t) (autoload 'insert-yearly-islamic-diary-entry "diary-ins" "\ Insert an annual diary entry for the day of the Islamic year corresponding to the date indicated by point." t) (autoload 'list-calendar-holidays "holidays" "\ Create a buffer containing the holidays for the current calendar window. The holidays are those in the list `calendar-notable-days'. Returns t if any holidays are found, nil if not." t) (autoload 'mark-calendar-holidays "holidays" "\ Mark notable days in the calendar window." t) (autoload 'calendar-cursor-holidays "holidays" "\ Find holidays for the date specified by the cursor in the calendar window." t) (fset 'generate-calendar-window #[(&optional mon yr) " @ A@ AA@? $\nX\nY) !  \" \" E!!! U Z!! !\" ." [nil buffer-read-only calendar-current-date today month day year mon calendar-interval yr offset 1 -1 today-visible calendar-day-of-week day-in-week update-calendar-mode-line generate-calendar calendar-cursor-to-visible-date displayed-month displayed-year set-buffer-modified-p one-window-p t screen-width window-width shrink-window window-height 9 sit-for 0 mark-holidays-in-calendar mark-calendar-holidays ((byte-code "!!" [today-visible run-hooks today-visible-calendar-hook today-invisible-calendar-hook] 2)) mark-diary-entries-in-calendar mark-diary-entries] 6 "\ Generate the calendar window for the current date. Or, for optional MON, YR."]) (fset 'generate-calendar #[(month year) " S_\\W!  _\\\\\n¦T\n¥)  T Y  _\\# _\\\n¦T\n¥)W)" [month year 12 2 error "Months before February, 1 AD are not available." displayed-month displayed-year erase-buffer -2 macro-y -1 i generate-calendar-month 25 5] 6 "\ Generate a three-month Gregorian calendar centered around MONTH, YEAR."]) (fset 'generate-calendar-month #[(month year indent) "\n E! Z\"\nU ɦU ˦U ̦Uͪ\nSHeb\n! #E##\"TY \\\"HOccb)#\"TYcp)TY\"c\\\"UbU[#T\"L+" [calendar-mod calendar-day-of-week month 1 year calendar-week-start-day 7 blank-days 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] last calendar-insert-indented calendar-string-spread "" format "%s %d" calendar-month-name 32 20 indent t -1 i 6 calendar-day-name-array " " " " "%2d "] 7 "\ Produce a calendar for MONTH, YEAR on the Gregorian calendar. The calendar is inserted in the buffer starting at the line on which point is currently located, but indented INDENT spaces. The indentation is done from the first character on the line and does not disturb the first INDENT characters on the line."]) (fset 'calendar-insert-indented #[(string indent &optional newline) " !i W j\nc m yƇ" [move-to-column indent string newline nil 1 t] 2 "\ Insert STRING at column INDENT. If the optional parameter NEWLINE is t, leave point at start of next line, inserting a newline if there was no next line; otherwise, leave point after the inserted text. Value is always t."]) (fset 'redraw-calendar #[nil "  \" !)" [calendar-cursor-to-date cursor-date generate-calendar-window displayed-month displayed-year calendar-cursor-to-visible-date] 3 "\ Redraw the calendar display." nil]) (defvar calendar-debug-sexp nil "\ *Turn debugging on when evaluating a sexp in the diary or holiday list.") (byte-code "!   TY !#n)֯ @@!@ @#AmA)X) # # # # # # # # # # # # # # # # # # # # @# AB# CD# EF# GH# IJ# KL# MN# OP# QR# ST# UV# WX# YZ# [\\# ]^# _`# ab# cd# ef# gh# ij# kl# mn# op# qr# st# uv# wx# yz# {|# }~# # # # # # # # # # # # # # # # # # # # # # # # #‡" [boundp calendar-mode-map nil make-sparse-keymap -1 i 9 define-key int-to-string digit-argument narrow-to-region mark-word mark-sexp mark-paragraph mark-defun mark-whole-buffer mark-page kill-region copy-region-as-kill downcase-region upcase-region capitalize-region write-region l where-is-internal k calendar-not-implemented "-" negative-argument ">" scroll-calendar-right [prior] scroll-calendar-right-three-months "<" scroll-calendar-left [next] scroll-calendar-left-three-months "" calendar-backward-day "" calendar-backward-week "{" calendar-backward-month "[" calendar-backward-year "" calendar-forward-day "" calendar-forward-week [left] [up] [right] [down] "}" calendar-forward-month "]" calendar-forward-year "" calendar-beginning-of-week "" calendar-end-of-week "a" calendar-beginning-of-month "e" calendar-end-of-month "<" calendar-beginning-of-year ">" calendar-end-of-year "" calendar-set-mark "" calendar-exchange-point-and-mark "=" calendar-count-days-region "gd" calendar-goto-date "gj" calendar-goto-julian-date "ga" calendar-goto-astro-day-number "gh" calendar-goto-hebrew-date "gi" calendar-goto-islamic-date "gc" calendar-goto-iso-date "gf" calendar-goto-french-date "gml" calendar-goto-mayan-long-count-date "gmpc" calendar-previous-calendar-round-date "gmnc" calendar-next-calendar-round-date "gmph" calendar-previous-haab-date "gmnh" calendar-next-haab-date "gmpt" calendar-previous-tzolkin-date "gmnt" calendar-next-tzolkin-date "S" calendar-sunrise-sunset "M" calendar-phases-of-moon " " scroll-other-window " " redraw-calendar "." calendar-current-month "o" calendar-other-month "q" exit-calendar "a" list-calendar-holidays "h" calendar-cursor-holidays "x" mark-calendar-holidays "u" calendar-unmark "m" mark-diary-entries "d" view-diary-entries "s" show-all-diary-entries "pd" calendar-print-day-of-year "pc" calendar-print-iso-date "pj" calendar-print-julian-date "pa" calendar-print-astro-day-number "ph" calendar-print-hebrew-date "pi" calendar-print-islamic-date "pf" calendar-print-french-date "pm" calendar-print-mayan-date "id" insert-diary-entry "iw" insert-weekly-diary-entry "im" insert-monthly-diary-entry "iy" insert-yearly-diary-entry "ia" insert-anniversary-diary-entry "ib" insert-block-diary-entry "ic" insert-cyclic-diary-entry "ihd" insert-hebrew-diary-entry "ihm" insert-monthly-hebrew-diary-entry "ihy" insert-yearly-hebrew-diary-entry "iid" insert-islamic-diary-entry "iim" insert-monthly-islamic-diary-entry "iiy" insert-yearly-islamic-diary-entry "?" describe-calendar-mode] 14) (fset 'describe-calendar-mode #[nil "!!#! " ["*Help*" princ format "Calendar Mode:\nFor a complete description, type %s\n%s\n" substitute-command-keys "\\\\[describe-mode] from within the calendar" "\\{calendar-mode-map}" print-help-return-message] 7 "\ Create a help buffer with a brief description of the calendar-mode." nil]) (put 'calendar-mode 'mode-class 'special) (defvar calendar-mode-line-format (byte-code "!!!" [substitute-command-keys "\\\\[scroll-calendar-left]" "Calendar" "\\\\[describe-calendar-mode] help/\\[calendar-other-month] other/\\[calendar-current-month] current" (calendar-date-string (calendar-current-date) t) "\\\\[scroll-calendar-right]"] 6) "\ The mode line of the calendar buffer.") (fset 'calendar-mode #[nil " !\n !!!!" [kill-all-local-variables calendar-mode major-mode "Calendar" mode-name use-local-map calendar-mode-map t buffer-read-only nil indent-tabs-mode update-calendar-mode-line make-local-variable calendar-window-configuration calendar-mark-ring displayed-month displayed-year] 2 "\ A major mode for the calendar window. The commands for cursor movement are:\\ \\[calendar-forward-day] one day forward \\[calendar-backward-day] one day backward \\[calendar-forward-week] one week forward \\[calendar-backward-week] one week backward \\[calendar-forward-month] one month forward \\[calendar-backward-month] one month backward \\[calendar-forward-year] one year forward \\[calendar-backward-year] one year backward \\[calendar-beginning-of-week] beginning of week \\[calendar-end-of-week] end of week \\[calendar-beginning-of-month] beginning of month \\[calendar-end-of-month] end of month \\[calendar-beginning-of-year] beginning of year \\[calendar-end-of-year] end of year \\[calendar-goto-date] go to date \\[calendar-goto-julian-date] go to Julian date \\[calendar-goto-astro-day-number] go to astronomical (Julian) day number \\[calendar-goto-hebrew-date] go to Hebrew date \\[calendar-goto-islamic-date] go to Islamic date \\[calendar-goto-iso-date] go to ISO date \\[calendar-goto-french-date] go to French Revolutionary date \\[calendar-goto-mayan-long-count-date] go to Mayan Long Count date \\[calendar-next-haab-date] go to next occurrence of Mayan Haab date \\[calendar-previous-haab-date] go to previous occurrence of Mayan Haab date \\[calendar-next-tzolkin-date] go to next occurrence of Mayan Tzolkin date \\[calendar-previous-tzolkin-date] go to previous occurrence of Mayan Tzolkin date \\[calendar-next-calendar-round-date] go to next occurrence of Mayan Calendar Round date \\[calendar-previous-calendar-round-date] go to previous occurrence of Mayan Calendar Round date You can mark a date in the calendar and switch the point and mark: \\[calendar-set-mark] mark date \\[calendar-exchange-point-and-mark] exchange point and mark You can determine the number of days (inclusive) between the point and mark by \\[calendar-count-days-region] count days in the region The commands for calendar movement are: \\[scroll-calendar-right] scroll one month right \\[scroll-calendar-left] scroll one month left \\[scroll-calendar-right-three-months] scroll 3 months right \\[scroll-calendar-left-three-months] scroll 3 months left \\[calendar-current-month] display current month \\[calendar-other-month] display another month Whenever it makes sense, the above commands take prefix arguments that multiply their affect. For convenience, the digit keys and the minus sign are bound to digit-argument, so they need not be prefixed with ESC. If the calendar window somehow becomes corrupted, it can be regenerated with \\[redraw-calendar] redraw the calendar The following commands deal with holidays and other notable days: \\[calendar-cursor-holidays] give holidays for the date specified by the cursor \\[mark-calendar-holidays] mark notable days \\[calendar-unmark] unmark dates \\[list-calendar-holidays] display notable days The command M-x holidays causes the notable dates for the current month, and the preceding and succeeding months, to be displayed, independently of the calendar. The following commands control the diary: \\[mark-diary-entries] mark diary entries \\[calendar-unmark] unmark dates \\[view-diary-entries] display diary entries \\[show-all-diary-entries] show all diary entries \\[print-diary-entries] print diary entries Displaying the diary entries causes the diary entries from the diary-file (for the date indicated by the cursor in the calendar window) to be displayed in another window. This function takes an integer argument that specifies the number of days of calendar entries to be displayed, starting with the date indicated by the cursor. The command \\[print-diary-entries] prints the diary buffer (as it appears) on the line printer. The command M-x diary causes the diary entries for the current date to be displayed, independently of the calendar. The number of days of entries is governed by number-of-diary-entries. The format of the entries in the diary file is described in the documentation string for the variable diary-file. When diary entries are in view in the window, they can be edited. It is important to keep in mind that the buffer displayed contains the entire diary file, but with portions of it concealed from view. This means, for instance, that the forward-char command can put the cursor at what appears to be the end of the line, but what is in reality the middle of some concealed line. BE CAREFUL WHEN EDITING THE DIARY ENTRIES! (Inserting additional lines or adding/deleting characters in the middle of a visible line will not cause problems; watch out for end-of-line, however--it may put you at the end of a concealed line far from where the cursor appears to be!) BEFORE EDITING THE DIARY IT IS BEST TO DISPLAY THE ENTIRE FILE WITH show-all-diary-entries. BE SURE TO WRITE THE FILE BEFORE EXITING FROM THE CALENDAR. The following commands assist in making diary entries: \\[insert-diary-entry] insert a diary entry for the selected date \\[insert-weekly-diary-entry] insert a diary entry for the selected day of the week \\[insert-monthly-diary-entry] insert a diary entry for the selected day of the month \\[insert-yearly-diary-entry] insert a diary entry for the selected day of the year \\[insert-block-diary-entry] insert a diary entry for the block days between point and mark \\[insert-anniversary-diary-entry] insert an anniversary diary entry for the selected date \\[insert-cyclic-diary-entry] insert a cyclic diary entry There are corresponding commands to assist in making Hebrew- or Islamic-date diary entries: \\[insert-hebrew-diary-entry] insert a diary entry for the Hebrew date corresponding to the selected date \\[insert-monthly-hebrew-diary-entry] insert a diary entry for the day of the Hebrew month corresponding to the selected day \\[insert-yearly-hebrew-diary-entry] insert a diary entry for the day of the Hebrew year corresponding to the selected day \\[insert-islamic-diary-entry] insert a diary entry for the Islamic date corresponding to the selected date \\[insert-monthly-islamic-diary-entry] insert a diary entry for the day of the Islamic month corresponding to the selected day \\[insert-yearly-islamic-diary-entry] insert a diary entry for the day of the Islamic year corresponding to the selected day All of the diary entry commands make nonmarking entries when given a prefix argument; with no prefix argument, the diary entries are marking. The day number in the year and the number of days remaining in the year can be determined by \\[calendar-print-day-of-year] show day number and the number of days remaining in the year Equivalent dates on the ISO commercial, Julian, Hebrew, Islamic, French Revolutionary, and Mayan calendars can be determined by \\[calendar-print-iso-date] show equivalent date on the ISO commercial calendar \\[calendar-print-julian-date] show equivalent date on the Julian calendar \\[calendar-print-hebrew-date] show equivalent date on the Hebrew calendar \\[calendar-print-islamic-date] show equivalent date on the Islamic calendar \\[calendar-print-french-date] show equivalent date on the French Revolutionary calendar \\[calendar-print-mayan-date] show equivalent date on the Mayan calendar The astronomical (Julian) day number of a date is found with \\[calendar-print-astro-day-number] show equivalent astronomical (Julian) day number To find the times of sunrise and sunset and lunar phases use \\[calendar-sunrise-sunset] show times of sunrise and sunset \\[calendar-phases-of-moon] show times of quarters of the moon The times given will be for location `calendar-location-name' at latitude `calendar-latitude', longitude `calendar-longitude'; set these variables for your location. The following variables are also consulted, and you must set them if your system does not initialize them properly: `calendar-time-zone', `calendar-daylight-time-offset', `calendar-standard-time-zone-name', `calendar-daylight-time-zone-name', `calendar-daylight-savings-starts', `calendar-daylight-savings-ends', `calendar-daylight-savings-starts-time', `calendar-daylight-savings-ends-time'. To exit from the calendar use \\[exit-calendar] exit from calendar The variable `view-diary-entries-initially', whose default is nil, can be set to to t cause diary entries for the current date will be displayed in another window when the calendar is first displayed, if the current date is visible. The variable `number-of-diary-entries' controls number of days of diary entries that will be displayed initially or with the command M-x diary. For example, if the default value 1 is used, then only the current day's diary entries will be displayed. If the value 2 is used, both the current day's and the next day's entries will be displayed. The value can also be a vector: If the value is [0 2 2 2 2 4 1] then no diary entries will be displayed on Sunday, the current date's and the next day's diary entries will be displayed Monday through Thursday, Friday through Monday's entries will be displayed on Friday, while on Saturday only that day's entries will be displayed. The variable `view-calendar-holidays-initially' can be set to t to cause the holidays for the current three month period will be displayed on entry to the calendar. The holidays are displayed in another window. The variable `mark-diary-entries-in-calendar' can be set to t to cause any dates visible with calendar entries to be marked with the symbol specified by the variable `diary-entry-marker', normally a plus sign. The variable `calendar-load-hook', whose default value is nil, is list of functions to be called when the calendar is first loaded. The variable `initial-calendar-window-hook', whose default value is nil, is list of functions to be called when the calendar window is first opened. The functions invoked are called after the calendar window is opened, but once opened is never called again. Leaving the calendar with the `q' command and reentering it will cause these functions to be called again. The variable `today-visible-calendar-hook', whose default value is nil, is the list of functions called after the calendar buffer has been prepared with the calendar when the current date is visible in the window. This can be used, for example, to replace today's date with asterisks; a function calendar-star-date is included for this purpose: (setq today-visible-calendar-hook 'calendar-star-date) It could also be used to mark the current date with `*'; a function is also provided for this: (setq today-visible-calendar-hook 'calendar-mark-today) The variable `today-invisible-calendar-hook', whose default value is nil, is the list of functions called after the calendar buffer has been prepared with the calendar when the current date is not visible in the window. The variable `diary-display-hook' is the list of functions called after the diary buffer is prepared. The default value simply displays the diary file using selective-display to conceal irrelevant diary entries. An alternative function `fancy-diary-display' is provided that, when used as the `diary-display-hook', causes a noneditable buffer to be prepared with a neatly organized day-by-day listing of relevant diary entries, together with any known holidays. The inclusion of the holidays slows this fancy display of the diary; to speed it up, set the variable `holidays-in-diary-buffer' to nil. The variable `print-diary-entries-hook' is the list of functions called after a temporary buffer is prepared with the diary entries currently visible in the diary buffer. The default value of this hook adds a heading (composed from the diary buffer's mode line), does the printing with the command lpr-buffer, and kills the temporary buffer. Other uses might include, for example, rearranging the lines into order by day and time. The Gregorian calendar is assumed."]) (fset 'calendar-string-spread #[(strings char length) "\n\" \n\"GZ\nGS\n@\nA\n\n\n\\] \"\n@Q\nT\n\nA` O." [mapcar eval strings length apply concat n m s 0 i make-string char] 6 "\ Concatenate list of STRINGS separated with copies of CHAR to fill LENGTH There must be at least 2 strings. The effect is like mapconcat but the separating pieces are as balanced as possible. Each item of STRINGS is evaluated before concatenation so it can actually be an expression that evaluates to a string. If LENGTH is too short, the STRINGS are just concatenated and the result truncated."]) (fset 'update-calendar-mode-line #[nil "\n!!\nq #)" [bufferp get-buffer calendar-buffer calendar-string-spread calendar-mode-line-format 32 screen-width mode-line-format] 4 "\ Update the calendar mode line with the current date and date style."]) (fset 'exit-calendar #[nil " ! ! ! ! !! !!! ! !! !q!!+" [get-file-buffer diary-file get-buffer fancy-diary-buffer holiday-buffer h-buffer d-buffer diary-buffer set-window-configuration calendar-window-configuration bury-buffer calendar-buffer buffer-modified-p yes-or-no-p "Diary modified; do you really want to exit the calendar? " set-buffer-modified-p nil] 5 "\ Get out of the calendar window and bury it and related buffers." nil]) (fset 'calendar-current-month #[nil "  ! !)" [calendar-current-date today calendar-date-is-visible-p generate-calendar-window update-calendar-mode-line calendar-cursor-to-visible-date] 2 "\ Reposition the calendar window so the current date is visible." nil]) (fset 'calendar-forward-month #[(arg) " !@ A@ AA@_  \\\\\\ ȦT ȥ) UͦUϦUЦUѪ SHW) E! \"!-" [calendar-cursor-to-nearest-date calendar-cursor-to-date error "Cursor is not on a date!" cursor-date month day year 12 arg -1 macro-y 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] last new-cursor-date calendar-date-is-visible-p calendar-other-month calendar-cursor-to-visible-date] 5 "\ Move the cursor forward ARG months. Movement is backward if ARG is negative." "p"]) (fset 'calendar-forward-year #[(arg) " _!" [calendar-forward-month arg 12] 3 "\ Move the cursor forward by ARG years. Movement is backward if ARG is negative." "p"]) (fset 'calendar-backward-month #[(arg) " [!" [calendar-forward-month arg] 2 "\ Move the cursor backward by ARG months. Movement is forward if ARG is negative." "p"]) (fset 'calendar-backward-year #[(arg) " _!" [calendar-forward-month arg -12] 3 "\ Move the cursor backward ARG years. Movement is forward is ARG is negative." "p"]) (fset 'scroll-calendar-left #[(arg) "  U?_ \\\\\\ ȦT  ȥ) \" ! !  E!*" [calendar-cursor-to-nearest-date calendar-cursor-to-date calendar-current-date today old-date arg 0 displayed-year 12 displayed-month -1 macro-y generate-calendar-window calendar-cursor-to-visible-date calendar-date-is-visible-p 1] 5 "\ Scroll the displayed calendar left by ARG months. If ARG is negative the calendar is scrolled right. Maintains the relative position of the cursor with respect to the calendar as well as possible." "p"]) (fset 'scroll-calendar-right #[(arg) " [!" [scroll-calendar-left arg] 2 "\ Scroll the displayed calendar window right by ARG months. If ARG is negative the calendar is scrolled left. Maintains the relative position of the cursor with respect to the calendar as well as possible." "p"]) (fset 'scroll-calendar-left-three-months #[(arg) " _!" [scroll-calendar-left arg 3] 3 "\ Scroll the displayed calendar window left by 3*ARG months. If ARG is negative the calendar is scrolled right. Maintains the relative position of the cursor with respect to the calendar as well as possible." "p"]) (fset 'scroll-calendar-right-three-months #[(arg) " _!" [scroll-calendar-left arg -3] 3 "\ Scroll the displayed calendar window right by 3*ARG months. If ARG is negative the calendar is scrolled left. Maintains the relative position of the cursor with respect to the calendar as well as possible." "p"]) (fset 'calendar-current-date #[nil "  \" ƔƕO#\"A ͔͕O! ϔϕO! E-" [current-time-string date string-match "^\\([A-Z][a-z]*\\) *\\([A-Z][a-z]*\\) *\\([0-9]*\\) .* \\([0-9]*\\)$" garbage assoc 2 calendar-make-alist calendar-month-name-array 1 (lambda (x) (substring x 0 3)) month string-to-int 3 day 4 year] 6 "\ Returns the current date in a list (month day year). If in the calendar buffer, also sets the current date local variables."]) (fset 'calendar-cursor-to-date #[nil "!e`\"W!u``\\{! U   i̥  \\\\ЦUЪU USU UT E." [looking-at "[*0-9]" 2 count-lines re-search-backward "[^0-9]" 1 string-to-int 3 day 0 starred-day 25 segment displayed-month -1 12 month displayed-year year] 5 "\ Returns a list of the month, day, and year of current cursor position. Returns nil if the cursor is not on a specific day."]) (fset 'calendar-cursor-to-nearest-date #[nil " i\ne`\"V! !!! W V W V W#!# *" [calendar-cursor-to-date column date 3 count-lines goto-line move-to-column looking-at "[0-9]" " *$" 25 27 50 52 75 re-search-forward nil t backward-char 1 re-search-backward] 5 "\ Move the cursor to the closest date. The position of the cursor is unchanged if it is already on a date. Returns the list (month day year) giving the cursor position."]) (fset 'calendar-forward-day #[(arg) "U?  VS  AA@S @ A@ AA@ S_\\ V _\\ϥZ  ͦU ЦU ѦU T  ,_ͥХ[ѥ\\\\\\\\)\\!@AA@!\"!-" [arg 0 calendar-cursor-to-date cursor-date calendar-cursor-to-nearest-date calendar-gregorian-from-absolute prior-years month day year 31 day-of-year 2 4 23 10 100 400 365 new-cursor-date new-display-month new-display-year calendar-date-is-visible-p calendar-other-month calendar-cursor-to-visible-date] 8 "\ Move the cursor forward ARG days. Moves backward if ARG is negative." "p"]) (fset 'calendar-backward-day #[(arg) " [!" [calendar-forward-day arg] 2 "\ Move the cursor back ARG days. Moves forward if ARG is negative." "p"]) (fset 'calendar-forward-week #[(arg) " _!" [calendar-forward-day arg 7] 3 "\ Move the cursor forward ARG weeks. Moves backward if ARG is negative." "p"]) (fset 'calendar-backward-week #[(arg) " _!" [calendar-forward-day arg -7] 3 "\ Move the cursor back ARG weeks. Moves forward if ARG is negative." "p"]) (fset 'calendar-beginning-of-week #[(arg) " ! U_ Z\"S_\\!)" [calendar-cursor-to-nearest-date calendar-day-of-week calendar-cursor-to-date day calendar-backward-day calendar-week-start-day arg 7 calendar-mod] 4 "\ Move the cursor back ARG calendar-week-start-day's." "p"]) (fset 'calendar-end-of-week #[(arg) " ! S\"U_ Z\"ZS_\\!)" [calendar-cursor-to-nearest-date calendar-day-of-week calendar-cursor-to-date day calendar-forward-day calendar-mod calendar-week-start-day 7 arg 6] 5 "\ Move the cursor forward ARG calendar-week-start-day+6's." "p"]) (fset 'calendar-beginning-of-month #[(arg) " @\nA@\nAA@ U! E!S!," [calendar-cursor-to-nearest-date calendar-cursor-to-date date month day year 1 calendar-backward-month arg calendar-cursor-to-visible-date] 5 "\ Move the cursor backward ARG month beginnings." "p"]) (fset 'calendar-end-of-month #[(arg) " @\nA@\nAA@ U ǦU ɦU ʦU˪ SH  U  E!S _ \\\\\\ЦTХ) U ǦU ɦU ʦU˪ SH E  ! \" !." [calendar-cursor-to-nearest-date calendar-cursor-to-date date month day year 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] last-day calendar-cursor-to-visible-date arg 12 -1 macro-y calendar-date-is-visible-p calendar-other-month] 5 "\ Move the cursor forward ARG month ends." "p"]) (fset 'calendar-beginning-of-year #[(arg) " @\nA@\nAA@Ɖ E U U _! U!!  SZ\"-" [calendar-cursor-to-nearest-date calendar-cursor-to-date date month day year 1 jan-first calendar-backward-month arg 12 calendar-date-is-visible-p calendar-cursor-to-visible-date calendar-other-month] 5 "\ Move the cursor backward ARG year beginnings." "p"]) (fset 'calendar-end-of-year #[(arg) " @\nA@\nAA@ E U U\n_!\nU!! \nSZ\"E!-" [calendar-cursor-to-nearest-date calendar-cursor-to-date date month day year 12 31 dec-31 calendar-forward-month arg 1 calendar-date-is-visible-p calendar-cursor-to-visible-date calendar-other-month displayed-year] 5 "\ Move the cursor forward ARG year beginnings." "p"]) (fset 'calendar-gregorian-from-absolute #[(date) "S¥ ¦ť Ŧȥ Ȧ\n˥ \n˦T __ _ \\\\\\U UETUЦUϦUΦUتSH W Z )TA E*.\n" [date d0 146097 n400 d1 36524 n100 d2 1461 n4 d3 365 n1 day 400 100 4 year 12 31 1 month 2 0 29 [31 28 31 30 31 30 31 31 30 31 30 31] mdays] 5 "\ Compute the list (month day year) corresponding to the absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (fset 'calendar-mod #[(x y) " \n\" V \n\\ )" [mod x y v 0] 3 "\ Returns X % Y; value is *always* non-negative."]) (fset 'calendar-cursor-to-visible-date #[(date) "@A@AA@ E!\n E! Z\"\\\\ʥ\\! $T_! Z\"_\\\\!," [date month day year calendar-day-of-week 1 first-of-month-weekday goto-line calendar-mod calendar-week-start-day 7 -1 3 move-to-column calendar-interval displayed-month displayed-year 25 6] 7 "\ Move the cursor to DATE that is on the screen."]) (fset 'calendar-other-month #[(month year) " U\n U? \n\"!!\nE!*" [month displayed-month year displayed-year calendar-cursor-to-date calendar-current-date today old-date generate-calendar-window calendar-cursor-to-visible-date calendar-date-is-visible-p 1] 4 "\ Display a three-month calendar centered around MONTH and YEAR." (byte-code " \"\"$! !\"A AA@!# +D" [t completion-ignore-case assoc capitalize completing-read "Month name: " mapcar list append calendar-month-name-array nil calendar-make-alist month calendar-read "Year (>0): " (lambda (x) (> x 0)) int-to-string calendar-current-date year] 9)]) (fset 'calendar-set-mark #[(arg) " ! BGTV ǡ! ! @! CA)" [calendar-cursor-to-date error "Cursor is not on a date!" date arg calendar-mark-ring mark-ring-max nil message "Mark set" "No mark set in this buffer" calendar-goto-date] 3 "\ Mark the date under the cursor, or jump to marked date. With no prefix argument, push current date onto marked date ring. With argument, jump to mark, pop it, and put point at end of ring." "P"]) (fset 'calendar-exchange-point-and-mark #[nil "@ !! AB !*" [calendar-mark-ring calendar-cursor-to-date error "Cursor is not on a date!" date mark "No mark set in this buffer" calendar-goto-date] 4 "\ Exchange the current cursor position with the marked date." nil]) (fset 'calendar-count-days-region #[nil " !AA@S !@ !A@ !AA@ S_\\ V _\\̥ZʦUΦUϦUT, _ ʥ Υ[ ϥ\\\\\\\\)@!AA@S@!@@!A@@!AA@ S_\\ V _\\̥ZʦUΦUϦUT, _ ʥ Υ[ ϥ\\\\\\\\)ZV[TVת#*" [calendar-cursor-to-date error "Cursor is not on a date!" prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 calendar-mark-ring "No mark set in this buffer" days message "Region has %d day%s (inclusive)" 1 "s" ""] 8 "\ Count the number of days (inclusive) between point and the mark." nil]) (fset 'calendar-not-implemented #[nil " !\"" [error "%s not available in the calendar" global-key-binding this-command-keys] 4 "\ Not implemented." nil]) (fset 'calendar-read #[(prompt acceptable &optional initial-contents) " \n\" ! \n\"t )" [read-minibuffer prompt initial-contents value acceptable] 3 "\ Return an object read from the minibuffer. Prompt with the string PROMPT and use the function ACCEPTABLE to decide if entered item is acceptable. If non-nil, optional third arg INITIAL-CONTENTS is a string to insert in the minibuffer before reading."]) (fset 'calendar-read-date #[nil " AA@!# \"\"$!#\"AU ֦U ئU ٦UڪSH\"\"  E." [calendar-read "Year (>0): " (lambda (x) (> x 0)) int-to-string calendar-current-date year calendar-month-name-array month-array t completion-ignore-case assoc capitalize completing-read "Month name: " mapcar list append nil calendar-make-alist 1 month 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] last format "Day (1-%d): " (lambda (x) (and (< 0 x) (<= x last))) day] 10 "\ Prompt for Gregorian date. Returns a list (month day year)."]) (fset 'calendar-goto-date #[(date) "@AA@!\nU Uƪ\n \"*!" [date year month calendar-date-is-visible-p calendar-other-month 1 2 calendar-cursor-to-visible-date] 3 "\ Move cursor to DATE." (byte-code " C" [calendar-read-date] 1)]) (fset 'calendar-goto-julian-date #[(date &optional noecho) " !!! " [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-julian date noecho calendar-print-julian-date] 4 "\ Move cursor to Julian DATE; echo Julian date unless NOECHO is t." (byte-code "  AA@S @ A@ AA@\n S_\\ V _\\ХZ \nΦU\nҦU\nӦU T  ,_Υҥ[ӥ\\\\\\\\)!AA@!#\n\"\"$!#\"A\nΦUU㪅SH%\nUU誁%#\"  \nE.C" [calendar-current-date today calendar-read "Julian calendar year (>0): " (lambda (x) (> x 0)) int-to-string calendar-julian-from-absolute prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 calendar-month-name-array month-array t completion-ignore-case assoc capitalize completing-read "Julian calendar month name: " mapcar list append nil calendar-make-alist 1 29 [31 28 31 30 31 30 31 31 30 31 30 31] last format "Julian calendar day (%d-%d): " 3 (lambda (x) (and (< (if (and (= year 1) (= month 1)) 2 0) x) (<= x last)))] 11)]) (fset 'calendar-goto-hebrew-date #[(date &optional noecho) " !!! " [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-hebrew date noecho calendar-print-hebrew-date] 4 "\ Move cursor to Hebrew DATE; echo Hebrew date unless NOECHO is t." (byte-code "  AA@S @ A@ AA@\n S_\\ V _\\ХZ \nΦU\nҦU\nӦU T  ,_Υҥ[ӥ\\\\\\\\)!AA@!#\n\n!\"\"\nU$!#\"A\n\"(\nUU骁**(#\"  \nE.C" [calendar-current-date today calendar-read "Hebrew calendar year (>3760): " (lambda (x) (> x 3760)) int-to-string calendar-hebrew-from-absolute prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 hebrew-calendar-leap-year-p calendar-hebrew-month-name-array-leap-year calendar-hebrew-month-name-array-common-year month-array t completion-ignore-case assoc capitalize completing-read "Hebrew calendar month name: " mapcar list append nil 3761 (lambda (x) (let ((m (cdr (assoc (car x) (calendar-make-alist month-array))))) (< 0 (calendar-absolute-from-hebrew (list m (hebrew-calendar-last-day-of-month m year) year))))) calendar-make-alist 1 hebrew-calendar-last-day-of-month last 18 first format "Hebrew calendar day (%d-%d): " (lambda (x) (and (<= first x) (<= x last)))] 11)]) (fset 'calendar-goto-islamic-date #[(date &optional noecho) " !!! " [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-islamic date noecho calendar-print-islamic-date] 4 "\ Move cursor to Islamic DATE; echo Islamic date unless NOECHO is t." (byte-code "  AA@S @ A@ AA@\n S_\\ V _\\ХZ \nΦU\nҦU\nӦU T  ,_Υҥ[ӥ\\\\\\\\)!AA@!#\n\"\"$!#\"A\n\"$$\"\"  \nE.C" [calendar-current-date today calendar-read "Islamic calendar year (>0): " (lambda (x) (> x 0)) int-to-string calendar-islamic-from-absolute prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 calendar-islamic-month-name-array month-array t completion-ignore-case assoc capitalize completing-read "Islamic calendar month name: " mapcar list append nil calendar-make-alist 1 islamic-calendar-last-day-of-month last format "Islamic calendar day (1-%d): " (lambda (x) (and (< 0 x) (<= x last)))] 11)]) (fset 'calendar-goto-iso-date #[(date &optional noecho) " !!! " [calendar-goto-date calendar-gregorian-from-absolute calendar-absolute-from-iso date noecho calendar-print-iso-date] 4 "\ Move cursor to ISO DATE; echo ISO date unless NOECHO is t." (byte-code "  AA@!#ɉTEAA@S TE@ TEA@ TEAA@  S_\\ V _\\ҥZʦUԦUզUT, _ ʥ ԥ[ ե\\\\\\\\)\"S!@\"\"\"  E-C" [calendar-current-date today calendar-read "ISO calendar year (>0): " (lambda (x) (> x 0)) int-to-string year calendar-iso-from-absolute calendar-dayname-on-or-before 1 4 prior-years month day 31 day-of-year 2 23 10 0 100 400 365 no-weeks format "ISO calendar week (1-%d): " (lambda (x) (and (> x 0) (<= x no-weeks))) week "ISO day (1-7): " (lambda (x) (and (<= 1 x) (<= x 7)))] 9)]) (fset 'calendar-interval #[(mon1 yr1 mon2 yr2) " Z_ Z\\" [yr2 yr1 12 mon2 mon1] 3 "\ The number of months difference between MON1, YR1 and MON2, YR2."]) (fset 'calendar-day-name #[(date) "\n!H" [calendar-day-name-array calendar-day-of-week date] 3 "\ Returns a string with the name of the day of the week of DATE."]) (byte-code "!!" [boundp calendar-day-name-array ["Sunday" "Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday"] calendar-month-name-array ["January" "February" "March" "April" "May" "June" "July" "August" "September" "October" "November" "December"]] 2) (fset 'calendar-make-alist #[(sequence &optional start-index filter) "S\"\")" [start-index 0 index mapcar #[(x) "T \n!\nB" [index filter x] 2] append sequence nil] 5 "\ Make an assoc list corresponding to SEQUENCE. Start at index 1, unless optional START-INDEX is provided. If FILTER is provided, apply it to each item in the list."]) (fset 'calendar-month-name #[(month) " SH" [calendar-month-name-array month] 2 "\ The name of MONTH."]) (fset 'calendar-day-of-week #[(date) "AA@S@A@AA@ \nS_\\\nV\n_\\ʥZ ȦU ̦U ͦUT, _ ȥ ̥[ ͥ\\\\\\\\)Ϧ" [date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 7] 6 "\ Returns the day-of-the-week index of DATE, 0 for Sunday, 1 for Monday, etc."]) (fset 'calendar-unmark #[nil "!y`#` \n  \n  Z!%  Z!% d!% d!% d!% d!%!-" [nil mark-diary-entries-in-calendar mark-holidays-in-calendar goto-line 3 0 search-forward "**" t star-point star-date start buffer-read-only subst-char-in-region 2 string-to-char diary-entry-marker 32 calendar-holiday-marker set-buffer-modified-p] 6 "\ Delete the diary and holiday marks from the calendar." nil]) (fset 'calendar-date-is-visible-p #[(date) " \n @ AA@$ ! V W)" [calendar-interval displayed-month displayed-year date gap calendar-date-is-legal-p 2 -2] 5 "\ Returns t if DATE is legal and is visible in the calendar window."]) (fset 'calendar-date-is-legal-p #[(date) "@A@AA@ X X\nX\n U ǦU ɦU ʦU˪ SHX X+" [date year day month 1 12 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31]] 3 "\ Returns t if DATE is a legal date."]) (fset 'calendar-date-equal #[(date1 date2) "@ @UA@ A@UAA@ AA@U" [date1 date2] 2 "\ Returns t if the DATE1 and DATE2 are the same."]) (fset 'mark-visible-calendar-date #[(date &optional mark) " !\nq !u! cu)!)" [calendar-date-is-legal-p date calendar-buffer calendar-cursor-to-visible-date 1 nil buffer-read-only delete-char mark diary-entry-marker -2 set-buffer-modified-p] 2 "\ Leave mark DATE with MARK. MARK defaults to diary-entry-marker."]) (fset 'calendar-star-date #[nil "!u``Z{!!c!!)" [nil buffer-read-only make-variable-buffer-local starred-day 1 string-to-int 2 delete-char -2 "**" backward-char set-buffer-modified-p] 4 "\ Replace the date under the cursor in the calendar window with asterisks. This function can be used with the today-visible-calendar-hook run after the calendar window has been prepared."]) (fset 'calendar-mark-today #[nil "u!c!!)" [nil buffer-read-only 1 delete-char "=" backward-char 2 set-buffer-modified-p] 2 "\ Mark the date under the cursor in the calendar window with an equal sign. This function can be used with the today-visible-calendar-hook run after the calendar window has been prepared."]) (fset 'calendar-date-compare #[(date1 date2) "@AA@S@@@A@@AA@ \nS_\\\nV\n_\\ʥZ ȦU ̦U ͦUT, _ ȥ ̥[ ͥ\\\\\\\\)@AA@S@@@A@@AA@ \nS_\\\nV\n_\\ʥZ ȦU ̦U ͦUT, _ ȥ ̥[ ͥ\\\\\\\\)W" [date1 prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 date2] 7 "\ Returns t if DATE1 is before DATE2, nil otherwise. The actual dates are in the car of DATE1 and DATE2."]) (fset 'calendar-date-string #[(date &optional abbreviate nodayname) "? !O ! @ !O! A@! ! AA@! #." [nodayname abbreviate calendar-day-name date 0 3 dayname month calendar-month-name monthname int-to-string day year mapconcat eval calendar-date-display-form ""] 4 "\ A string form of DATE, driven by the variable `calendar-date-display-form'. An optional parameter ABBREVIATE, when t, causes the month and day names to be abbreviated to three characters. An optional parameter NODAYNAME, when t, omits the name of the day of the week."]) (fset 'calendar-dayname-on-or-before #[(dayname date) " Z¦Z" [date dayname 7] 3 "\ Returns the absolute date of the DAYNAME on or before absolute DATE. DAYNAME=0 means Sunday, DAYNAME=1 means Monday, and so on. Note: Applying this function to d+6 gives us the DAYNAME on or after an absolute day d. Similarly, applying it to d+3 gives the DAYNAME nearest to absolute date d, applying it to d-1 gives the DAYNAME previous to absolute date d, and applying it to d+7 gives the DAYNAME following absolute date d."]) (fset 'calendar-nth-named-absday #[(n dayname month year &optional day) "VS_ EAA@S E@EA@ EAA@ S_\\ V _\\ϥZ ͦUЦUѦU T  , _ ͥ Х[ ѥ\\\\\\\\)\\\"\\T_  UͦUЦUѦUԪ SHEAA@S  UͦUЦUѦUԪ SHE@ UͦUЦUѦUԪ SHEA@  UͦUЦUѦUԪ SHEAA@ S_\\ V _\\ϥZ ͦUЦUѦU T  , _ ͥ Х[ ѥ\\\\\\\\)\"\\" [n 0 7 calendar-dayname-on-or-before dayname month day 1 year prior-years 31 day-of-year 2 4 23 10 100 400 365 6 29 [31 28 31 30 31 30 31 31 30 31 30 31]] 10 "\ The absolute date of Nth DAYNAME in MONTH, YEAR before/after optional DAY. A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). If N>0, return the Nth DAYNAME after MONTH DAY, YEAR (inclusive). If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise."]) (fset 'calendar-nth-named-day #[(n dayname month year &optional day) "\n %!" [calendar-gregorian-from-absolute calendar-nth-named-absday n dayname month year day] 7 "\ The date of Nth DAYNAME in MONTH, YEAR before/after optional DAY. A DAYNAME of 0 means Sunday, 1 means Monday, and so on. If N<0, return the Nth DAYNAME before MONTH DAY, YEAR (inclusive). If N>0, return the Nth DAYNAME after MONTH DAY, YEAR (inclusive). If DAY is omitted, it defaults to 1 if N>0, and MONTH's last day otherwise."]) (fset 'calendar-print-day-of-year #[nil " !AA@ @ A@ AA@ S_\\ V _\\̥Z ʦU ΦU ϦUT, E@ EA@ EAA@ S_\\ V _\\̥Z ʦU ΦU ϦUT,Z Uժ%," [calendar-cursor-to-date error "Cursor is not on a date!" date year month day 31 day-of-year 2 4 23 10 0 100 400 12 days-remaining message "Day %d of %d; %d day%s remaining in the year" 1 "" "s"] 8 "\ Show the day number in the year and the number of days remaining in the year for the date under the cursor." nil]) (fset 'calendar-absolute-from-iso #[(date) "@A@AA@ʼn EAA@Sʼn E@ʼn EA@ʼn EAA@\nS_\\ V _\\ͥZ ˦U ϦU ЦU T  ,_˥ϥ[Х\\\\\\\\)\\\" S_\nUԪ\nS\\\\+" [date week day year calendar-dayname-on-or-before 1 prior-years month 31 day-of-year 2 4 23 10 0 100 400 365 3 7 6] 8 "\ The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The `ISO year' corresponds approximately to the Gregorian year, but weeks start on Monday and end on Sunday. The first week of the ISO year is the first such week in which at least 4 days are in a year. The ISO commercial DATE has the form (week day year) in which week is in the range 1..52 and day is in the range 0..6 (1 = Monday, 2 = Tuesday, ..., 0 = Sunday). The Gregorian date Sunday, December 31, 1 BC is imaginary."]) (fset 'calendar-iso-from-absolute #[(date) " Z!AA@ ȉTE!Y \\Ti *\\ ȉ E!ZʥT ʦ E*" [calendar-gregorian-from-absolute date 3 approx 0 sum y calendar-absolute-from-iso 1 year 7] 7 "\ Compute the `ISO commercial date' corresponding to the absolute DATE. The ISO year corresponds approximately to the Gregorian year, but weeks start on Monday and end on Sunday. The first week of the ISO year is the first such week in which at least 4 days are in a year. The ISO commercial date has the form (week day year) in which week is in the range 1..52 and day is in the range 0..6 (1 = Monday, 2 = Tuesday, ..., 0 = Sunday). The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (fset 'calendar-print-iso-date #[nil " !AA@S @ A@ AA@ S_\\ V _\\ͥZ ˦UϦUЦU T  , _ ˥ ϥ[ Х\\\\\\\\)Ҧ AA@S @ A@ AA@ S_\\ V _\\ͥZ ˦UϦUЦU T  , _ ˥ ϥ[ Х\\\\\\\\)!UҪ@AA@$+" [calendar-cursor-to-date error "Cursor is not on a date!" greg-date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 7 calendar-iso-from-absolute iso-date message "ISO date: Day %s of week %d of %d."] 8 "\ Show equivalent ISO date for the date under the cursor." nil]) (fset 'calendar-julian-from-absolute #[(date) "\\¥ȉTE!Y \\Ti *\\ \n\nU ˦U̪\nSH E!V \\\nT\nU *T E!SZ E," [date 2 366 approx 0 sum y calendar-absolute-from-julian 1 year m 4 29 [31 28 31 30 31 30 31 31 30 31 30 31] month day] 7 "\ Compute the Julian (month day year) corresponding to the absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (fset 'calendar-absolute-from-julian #[(date) "@A@AA@@A@AA@\n S_\\ V _\\ɥZ ǦU ˦U ̦U T , ˦U ̦U Vͪ S_ Sǥ\\\\\\\\+" [date year day month 31 day-of-year 2 4 23 10 0 100 400 1 365 -2] 5 "\ The number of days elapsed between the Gregorian date 12/31/1 BC and DATE. The Gregorian date Sunday, December 31, 1 BC is imaginary."]) (fset 'calendar-print-julian-date #[nil " !AA@S !@ !A@ !AA@\n S_\\ V _\\ХZ \nΦU\nҦU\nӦU T  ,_Υҥ[ӥ\\\\\\\\)!#\"" [message "Julian date: %s" calendar-date-string calendar-julian-from-absolute calendar-cursor-to-date error "Cursor is not on a date!" prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 nil t] 10 "\ Show the Julian calendar equivalent of the date under the cursor." nil]) (fset 'islamic-calendar-leap-year-p #[(year) "̯ >" [year 30 2 5 7 10 13 16 18 21 24 26 29] 12 "\ Returns t if YEAR is a leap year on the Islamic calendar."]) (fset 'islamic-calendar-last-day-of-month #[(month year) "Ư>LJ̯>͇!LJ͇" [month 1 3 5 7 9 11 30 2 4 6 8 10 29 islamic-calendar-leap-year-p year] 7 "\ The last day in MONTH during YEAR on the Islamic calendar."]) (fset 'islamic-calendar-day-number #[(date) "@A@ å_ Så_\n\\\\*" [date month day 2 30 29] 3 "\ Return the day number within the year of the Islamic date DATE."]) (fset 'calendar-absolute-from-islamic #[(date) "@A@AA@ĦWǪ Wɪ W˪ Wƪ WΪ WЪ WȪ WӪ Wʪ W֪! S_ ĥ_\\\\\\\\-" [date month day year 30 y 3 0 6 1 8 2 11 14 4 17 5 19 22 7 25 27 9 10 leap-years-in-cycle islamic-calendar-day-number 354 227014] 6 "\ Absolute date of Islamic DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (fset 'calendar-islamic-from-absolute #[(date) "W‰EZĥɉTE!Y\\Tg*\\\n   \n\"\nE!V\\ T b*T  \nE!SZ \nE," [date 227015 0 227014 355 approx sum y calendar-absolute-from-islamic 1 year m islamic-calendar-last-day-of-month month day] 7 "\ Compute the Islamic date (month day year) corresponding to absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (byte-code "!" [boundp calendar-islamic-month-name-array ["Muharram" "Safar" "Rabi I" "Rabi II" "Jumada I" "Jumada II" "Rajab" "Sha'ban" "Ramadan" "Shawwal" "Dhu al-Qada" "Dhu al-Hijjah"]] 2) (fset 'calendar-print-islamic-date #[nil " !AA@S !@ !A@ !AA@S_\\\nV\n_\\ΥZ\n̦UЦUѦU\nT\n\n, _ ̥ Х[ ѥ\\\\\\\\)!AA@W!#\"*" [calendar-islamic-month-name-array calendar-islamic-from-absolute calendar-cursor-to-date error "Cursor is not on a date!" prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 islamic-date calendar-month-name-array 1 message "Date is pre-Islamic" "Islamic date (until sunset): %s" calendar-date-string nil t] 8 "\ Show the Islamic calendar equivalent of the date under the cursor." nil]) (fset 'calendar-hebrew-from-absolute #[(date) " !\n@SH\nAA@\\ TE!YTm! \"E!V  Ti) E!ZT E," [calendar-gregorian-from-absolute date greg-date [9 10 11 12 1 2 3 4 7 7 7 8] month nil day 3760 year calendar-absolute-from-hebrew 7 1 hebrew-calendar-last-month-of-year length hebrew-calendar-last-day-of-month] 6 "\ Compute the Hebrew date (month day year) corresponding to absolute DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (fset 'hebrew-calendar-leap-year-p #[(year) "_T¦W" [year 7 19] 2 "\ t if YEAR is a Hebrew calendar leap year."]) (fset 'hebrew-calendar-last-month-of-year #[(year) " !‡Ç" [hebrew-calendar-leap-year-p year 13 12] 2 "\ The last month of the Hebrew calendar YEAR."]) (fset 'hebrew-calendar-last-day-of-month #[(month year) "ů>U!U!U!͇·" [month 2 4 6 10 13 12 hebrew-calendar-leap-year-p year 8 hebrew-calendar-long-heshvan-p 9 hebrew-calendar-short-kislev-p 29 30] 6 "\ The last day of MONTH in YEAR."]) (fset 'hebrew-calendar-elapsed-days #[(year) "S_S_S_T\\\\Ʀ_\\ _ ƥ_ ƥ\\\\\\ ̦_ Ʀ\\ _ ̥\\\\ YĦU Y!ĦU YS!TĦE>T." [year 19 235 12 7 months-elapsed 1080 793 204 parts-elapsed 5 hours-elapsed 24 parts 29 1 day 19440 2 9924 hebrew-calendar-leap-year-p 16789 alternative-day 0 3] 5 "\ Days from Sun. prior to start of Hebrew calendar to mean conjunction of Tishri of Hebrew YEAR."]) (fset 'hebrew-calendar-days-in-year #[(year) " T! !Z" [hebrew-calendar-elapsed-days year] 3 "\ Number of days in Hebrew YEAR."]) (fset 'hebrew-calendar-long-heshvan-p #[(year) " !¦U" [hebrew-calendar-days-in-year year 10 5] 2 "\ t if Heshvan is long in Hebrew YEAR."]) (fset 'hebrew-calendar-short-kislev-p #[(year) " !¦U" [hebrew-calendar-days-in-year year 10 3] 2 "\ t if Kislev is short in Hebrew YEAR."]) (fset 'calendar-absolute-from-hebrew #[(date) "@A@AA@\n W !X \"\\Th* W \"\\Tj*\\ W \"\\Tj* !\\\\\\+" [date month day year 7 0 sum m hebrew-calendar-last-month-of-year hebrew-calendar-last-day-of-month 1 hebrew-calendar-elapsed-days -1373429] 7 "\ Absolute date of Hebrew DATE. The absolute date is the number of days elapsed since the (imaginary) Gregorian date Sunday, December 31, 1 BC."]) (byte-code "!!" [boundp calendar-hebrew-month-name-array-common-year ["Nisan" "Iyar" "Sivan" "Tammuz" "Av" "Elul" "Tishri" "Heshvan" "Kislev" "Teveth" "Shevat" "Adar"] calendar-hebrew-month-name-array-leap-year ["Nisan" "Iyar" "Sivan" "Tammuz" "Av" "Elul" "Tishri" "Heshvan" "Kislev" "Teveth" "Shevat" "Adar I" "Adar II"]] 2) (fset 'calendar-print-hebrew-date #[nil " !AA@S !@ !A@ !AA@ S_\\ V _\\ͥZ ˦UϦUЦU T  , _ ˥ ϥ[ Х\\\\\\\\)!AA@!#\"*" [calendar-hebrew-from-absolute calendar-cursor-to-date error "Cursor is not on a date!" prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 hebrew-date hebrew-calendar-leap-year-p calendar-hebrew-month-name-array-leap-year calendar-hebrew-month-name-array-common-year calendar-month-name-array message "Hebrew date (until sunset): %s" calendar-date-string nil t] 7 "\ Show the Hebrew calendar equivalent of the date under the cursor." nil]) (fset 'hebrew-calendar-yahrzeit #[(death-date year) "A@@AA@\nU U T!\nE!S\nU U T!\nE!S\nU\n! \nE! U\nU\n!\nE!\n \nE!+" [death-date death-day death-month death-year 8 30 hebrew-calendar-long-heshvan-p calendar-absolute-from-hebrew 9 1 year hebrew-calendar-short-kislev-p 10 13 hebrew-calendar-last-month-of-year 12 hebrew-calendar-leap-year-p 11] 4 "\ Absolute date of the anniversary of Hebrew DEATH-DATE in Hebrew YEAR."]) (fset 'calendar-set-mode-line #[(str) "\nE #" [calendar-string-spread "" str 45 screen-width mode-line-format] 4 "\ Set mode line to STR, centered, surrounded by dashes."]) (fset 'list-yahrzeit-dates #[(death-date start-year end-year) "! AA@S @ A@ AA@ S_\\ V _\\ϥZ  ͦU ѦU ҦU T  ,_ͥѥ[ҥ\\\\\\\\)!@A@AA@ !q !! !\"#)#! eb%S&'&T&YN&EAA@S&E@&EA@&EAA@ S_\\ V _\\ϥZ  ͦU ѦU ҦU T  ,_ͥѥ[ҥ\\\\\\\\)!AA@\"!!)eb! !!-" [message "Computing yahrzeits..." "*Yahrzeits*" yahrzeit-buffer calendar-hebrew-from-absolute death-date prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 h-date h-month h-day h-year get-buffer-create nil buffer-read-only calendar-set-mode-line format "Yahrzeit dates for %s = %s" calendar-date-string hebrew-calendar-leap-year-p calendar-hebrew-month-name-array-leap-year calendar-hebrew-month-name-array-common-year calendar-month-name-array t erase-buffer start-year i end-year calendar-gregorian-from-absolute hebrew-calendar-yahrzeit 1 "\n" set-buffer-modified-p display-buffer "Computing yahrzeits...done"] 12 "\ List Yahrzeit dates for *Gregorian* DEATH-DATE from START-YEAR to END-YEAR. When called interactively from the calendar window, the date of death is taken from the cursor position." (byte-code "p !  AA@!# \n   \"\"$! #\"AU ڦU ܦU ݦUުSH  \"\"$$ E.%AA@&&\"&T!#))\"\",%),E," [get-buffer calendar-buffer calendar-cursor-to-date calendar-current-date today calendar-read "Year of death (>0): " (lambda (x) (> x 0)) int-to-string year calendar-month-name-array month-array t completion-ignore-case assoc capitalize completing-read "Month of death (name): " mapcar list append nil calendar-make-alist 1 month 2 4 0 100 400 29 [31 28 31 30 31 30 31 31 30 31 30 31] last format "Day of death (1-%d): " (lambda (x) (and (< 0 x) (<= x last))) day death-date death-year "Starting year of Yahrzeit table (>%d): " (lambda (x) (> x death-year)) start-year "Ending year of Yahrzeit table (>=%d): " (lambda (x) (>= x start-year)) end-year] 10)]) (fset 'calendar-print-astro-day-number #[nil " !AA@S !@ !A@ !AA@S_\\\nV\n_\\ΥZ\n̦UЦUѦU\nT\n\n, _ ̥ Х[ ѥ\\\\\\\\)\\\"" [message "Astronomical (Julian) day number after noon UTC: %d" calendar-cursor-to-date error "Cursor is not on a date!" prior-years month day year 31 day-of-year 2 4 23 10 0 100 400 365 1721425] 8 "\ Show astronomical (Julian) day number of afternoon on date shown by cursor." nil]) (fset 'calendar-goto-astro-day-number #[(daynumber &optional noecho) "\nZ!! " [calendar-goto-date calendar-gregorian-from-absolute daynumber 1721425 noecho calendar-print-astro-day-number] 4 "\ Move cursor to astronomical (Julian) DAYNUMBER. Echo astronomical (Julian) day number unless NOECHO is t." (byte-code "\"C" [calendar-read "Astronomical (Julian) day number (>1721425): " (lambda (x) (> x 1721425))] 3)]) (byte-code "!!" [run-hooks calendar-load-hook provide calendar] 2)