diff options
| author | Glenn Morris | 2008-03-07 05:06:34 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-07 05:06:34 +0000 |
| commit | c4632735bb2fb1c97aab9847bf0bdda2437b08c0 (patch) | |
| tree | a97c9385ae2ab254d82576c25cfe4e6f5c610039 | |
| parent | 79363d93603102d19aacf30b576e3720b07443ae (diff) | |
| download | emacs-c4632735bb2fb1c97aab9847bf0bdda2437b08c0.tar.gz emacs-c4632735bb2fb1c97aab9847bf0bdda2437b08c0.zip | |
(calendar-version): Use emacs-version and make it obsolete. Move to end.
(calendar-offset, view-diary-entries-initially)
(mark-diary-entries-in-calendar)
(calendar-remove-frame-by-deleting)
(view-calendar-holidays-initially, all-hebrew-calendar-holidays)
(all-christian-calendar-holidays, all-islamic-calendar-holidays)
(all-bahai-calendar-holidays, calendar-load-hook)
(initial-calendar-window-hook, today-visible-calendar-hook)
(today-invisible-calendar-hook, calendar-move-hook)
(diary-nonmarking-symbol, hebrew-diary-entry-symbol)
(islamic-diary-entry-symbol, bahai-diary-entry-symbol)
(diary-include-string, sexp-diary-entry-symbol)
(abbreviated-calendar-year, american-date-diary-pattern)
(european-date-diary-pattern, european-calendar-display-form)
(american-calendar-display-form, print-diary-entries-hook)
(list-diary-entries-hook, diary-hook, diary-display-hook)
(nongregorian-diary-listing-hook, mark-diary-entries-hook)
(nongregorian-diary-marking-hook, diary-list-include-blanks)
(holidays-in-diary-buffer, general-holidays, oriental-holidays)
(local-holidays, other-holidays, hebrew-holidays-1)
(hebrew-holidays-2, hebrew-holidays-3, hebrew-holidays-4)
(hebrew-holidays, christian-holidays, islamic-holidays)
(bahai-holidays, solar-holidays, calendar-setup)
(calendar-week-start-day): Remove autoload cookies.
(diary-glob-file-regexp-prefix): Doc fix.
(calendar-goto-info-node): Use `info' rather than `Info-find-node'.
(Info-find-emacs-command-nodes, Info-find-node): Remove declarations.
(calendar-week-start-day, calendar-debug-sexp): Move to start.
| -rw-r--r-- | lisp/calendar/calendar.el | 127 |
1 files changed, 34 insertions, 93 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 0525f193ec2..453eefcaaf0 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -98,10 +98,6 @@ | |||
| 98 | (defvar calendar-month-name-array) | 98 | (defvar calendar-month-name-array) |
| 99 | (defvar calendar-starred-day) | 99 | (defvar calendar-starred-day) |
| 100 | 100 | ||
| 101 | (defun calendar-version () | ||
| 102 | (interactive) | ||
| 103 | (message "Version 6, October 12, 1995")) | ||
| 104 | |||
| 105 | (defgroup calendar nil | 101 | (defgroup calendar nil |
| 106 | "Calendar and time management support." | 102 | "Calendar and time management support." |
| 107 | :group 'applications) | 103 | :group 'applications) |
| @@ -138,7 +134,6 @@ | |||
| 138 | (defconst calendar-buffer "*Calendar*" | 134 | (defconst calendar-buffer "*Calendar*" |
| 139 | "Name of the buffer used for the calendar.") | 135 | "Name of the buffer used for the calendar.") |
| 140 | 136 | ||
| 141 | ;;;###autoload | ||
| 142 | (defcustom calendar-offset 0 | 137 | (defcustom calendar-offset 0 |
| 143 | "The offset of the principal month from the center of the calendar window. | 138 | "The offset of the principal month from the center of the calendar window. |
| 144 | 0 means the principal month is in the center (default), -1 means on the left, | 139 | 0 means the principal month is in the center (default), -1 means on the left, |
| @@ -147,7 +142,6 @@ the screen." | |||
| 147 | :type 'integer | 142 | :type 'integer |
| 148 | :group 'calendar) | 143 | :group 'calendar) |
| 149 | 144 | ||
| 150 | ;;;###autoload | ||
| 151 | (defcustom view-diary-entries-initially nil | 145 | (defcustom view-diary-entries-initially nil |
| 152 | "Non-nil means display current date's diary entries on entry to calendar. | 146 | "Non-nil means display current date's diary entries on entry to calendar. |
| 153 | The diary is displayed in another window when the calendar is first displayed, | 147 | The diary is displayed in another window when the calendar is first displayed, |
| @@ -157,14 +151,12 @@ be overridden by the value of `calendar-setup'." | |||
| 157 | :type 'boolean | 151 | :type 'boolean |
| 158 | :group 'diary) | 152 | :group 'diary) |
| 159 | 153 | ||
| 160 | ;;;###autoload | ||
| 161 | (defcustom mark-diary-entries-in-calendar nil | 154 | (defcustom mark-diary-entries-in-calendar nil |
| 162 | "Non-nil means mark dates with diary entries, in the calendar window. | 155 | "Non-nil means mark dates with diary entries, in the calendar window. |
| 163 | The marking symbol is specified by the variable `diary-entry-marker'." | 156 | The marking symbol is specified by the variable `diary-entry-marker'." |
| 164 | :type 'boolean | 157 | :type 'boolean |
| 165 | :group 'diary) | 158 | :group 'diary) |
| 166 | 159 | ||
| 167 | ;;;###autoload | ||
| 168 | (defcustom calendar-remove-frame-by-deleting nil | 160 | (defcustom calendar-remove-frame-by-deleting nil |
| 169 | "Determine how the calendar mode removes a frame no longer needed. | 161 | "Determine how the calendar mode removes a frame no longer needed. |
| 170 | If nil, make an icon of the frame. If non-nil, delete the frame." | 162 | If nil, make an icon of the frame. If non-nil, delete the frame." |
| @@ -237,7 +229,6 @@ The value can be either a single-character string or a face." | |||
| 237 | :type '(choice string face) | 229 | :type '(choice string face) |
| 238 | :group 'calendar) | 230 | :group 'calendar) |
| 239 | 231 | ||
| 240 | ;;;###autoload | ||
| 241 | (defcustom view-calendar-holidays-initially nil | 232 | (defcustom view-calendar-holidays-initially nil |
| 242 | "Non-nil means display holidays for current three month period on entry. | 233 | "Non-nil means display holidays for current three month period on entry. |
| 243 | The holidays are displayed in another window when the calendar is first | 234 | The holidays are displayed in another window when the calendar is first |
| @@ -245,14 +236,12 @@ displayed." | |||
| 245 | :type 'boolean | 236 | :type 'boolean |
| 246 | :group 'holidays) | 237 | :group 'holidays) |
| 247 | 238 | ||
| 248 | ;;;###autoload | ||
| 249 | (defcustom mark-holidays-in-calendar nil | 239 | (defcustom mark-holidays-in-calendar nil |
| 250 | "Non-nil means mark dates of holidays in the calendar window. | 240 | "Non-nil means mark dates of holidays in the calendar window. |
| 251 | The marking symbol is specified by the variable `calendar-holiday-marker'." | 241 | The marking symbol is specified by the variable `calendar-holiday-marker'." |
| 252 | :type 'boolean | 242 | :type 'boolean |
| 253 | :group 'holidays) | 243 | :group 'holidays) |
| 254 | 244 | ||
| 255 | ;;;###autoload | ||
| 256 | (defcustom all-hebrew-calendar-holidays nil | 245 | (defcustom all-hebrew-calendar-holidays nil |
| 257 | "If nil, show only major holidays from the Hebrew calendar. | 246 | "If nil, show only major holidays from the Hebrew calendar. |
| 258 | This means only those Jewish holidays that appear on secular calendars. | 247 | This means only those Jewish holidays that appear on secular calendars. |
| @@ -261,7 +250,6 @@ If t, show all the holidays that would appear in a complete Hebrew calendar." | |||
| 261 | :type 'boolean | 250 | :type 'boolean |
| 262 | :group 'holidays) | 251 | :group 'holidays) |
| 263 | 252 | ||
| 264 | ;;;###autoload | ||
| 265 | (defcustom all-christian-calendar-holidays nil | 253 | (defcustom all-christian-calendar-holidays nil |
| 266 | "If nil, show only major holidays from the Christian calendar. | 254 | "If nil, show only major holidays from the Christian calendar. |
| 267 | This means only those Christian holidays that appear on secular calendars. | 255 | This means only those Christian holidays that appear on secular calendars. |
| @@ -271,7 +259,6 @@ calendar." | |||
| 271 | :type 'boolean | 259 | :type 'boolean |
| 272 | :group 'holidays) | 260 | :group 'holidays) |
| 273 | 261 | ||
| 274 | ;;;###autoload | ||
| 275 | (defcustom all-islamic-calendar-holidays nil | 262 | (defcustom all-islamic-calendar-holidays nil |
| 276 | "If nil, show only major holidays from the Islamic calendar. | 263 | "If nil, show only major holidays from the Islamic calendar. |
| 277 | This means only those Islamic holidays that appear on secular calendars. | 264 | This means only those Islamic holidays that appear on secular calendars. |
| @@ -286,7 +273,6 @@ calendar." | |||
| 286 | :type 'function | 273 | :type 'function |
| 287 | :group 'diary) | 274 | :group 'diary) |
| 288 | 275 | ||
| 289 | ;;;###autoload | ||
| 290 | (defcustom all-bahai-calendar-holidays nil | 276 | (defcustom all-bahai-calendar-holidays nil |
| 291 | "If nil, show only major holidays from the Baha'i calendar. | 277 | "If nil, show only major holidays from the Baha'i calendar. |
| 292 | These are the days on which work and school must be suspended. | 278 | These are the days on which work and school must be suspended. |
| @@ -301,14 +287,12 @@ calendar." | |||
| 301 | :type 'hook | 287 | :type 'hook |
| 302 | :group 'calendar-hooks) | 288 | :group 'calendar-hooks) |
| 303 | 289 | ||
| 304 | ;;;###autoload | ||
| 305 | (defcustom calendar-load-hook nil | 290 | (defcustom calendar-load-hook nil |
| 306 | "List of functions to be called after the calendar is first loaded. | 291 | "List of functions to be called after the calendar is first loaded. |
| 307 | This is the place to add key bindings to `calendar-mode-map'." | 292 | This is the place to add key bindings to `calendar-mode-map'." |
| 308 | :type 'hook | 293 | :type 'hook |
| 309 | :group 'calendar-hooks) | 294 | :group 'calendar-hooks) |
| 310 | 295 | ||
| 311 | ;;;###autoload | ||
| 312 | (defcustom initial-calendar-window-hook nil | 296 | (defcustom initial-calendar-window-hook nil |
| 313 | "List of functions to be called when the calendar window is first opened. | 297 | "List of functions to be called when the calendar window is first opened. |
| 314 | The functions invoked are called after the calendar window is opened, but | 298 | The functions invoked are called after the calendar window is opened, but |
| @@ -317,7 +301,6 @@ and reentering it will cause these functions to be called again." | |||
| 317 | :type 'hook | 301 | :type 'hook |
| 318 | :group 'calendar-hooks) | 302 | :group 'calendar-hooks) |
| 319 | 303 | ||
| 320 | ;;;###autoload | ||
| 321 | (defcustom today-visible-calendar-hook nil | 304 | (defcustom today-visible-calendar-hook nil |
| 322 | "List of functions called whenever the current date is visible. | 305 | "List of functions called whenever the current date is visible. |
| 323 | This can be used, for example, to replace today's date with asterisks; a | 306 | This can be used, for example, to replace today's date with asterisks; a |
| @@ -337,7 +320,6 @@ functions that move by days and weeks." | |||
| 337 | :type 'hook | 320 | :type 'hook |
| 338 | :group 'calendar-hooks) | 321 | :group 'calendar-hooks) |
| 339 | 322 | ||
| 340 | ;;;###autoload | ||
| 341 | (defcustom today-invisible-calendar-hook nil | 323 | (defcustom today-invisible-calendar-hook nil |
| 342 | "List of functions called whenever the current date is not visible. | 324 | "List of functions called whenever the current date is not visible. |
| 343 | 325 | ||
| @@ -351,7 +333,6 @@ functions that move by days and weeks." | |||
| 351 | :type 'hook | 333 | :type 'hook |
| 352 | :group 'calendar-hooks) | 334 | :group 'calendar-hooks) |
| 353 | 335 | ||
| 354 | ;;;###autoload | ||
| 355 | (defcustom calendar-move-hook nil | 336 | (defcustom calendar-move-hook nil |
| 356 | "List of functions called whenever the cursor moves in the calendar. | 337 | "List of functions called whenever the cursor moves in the calendar. |
| 357 | 338 | ||
| @@ -471,31 +452,26 @@ details, see the documentation for the variable `list-diary-entries-hook'." | |||
| 471 | :type 'file | 452 | :type 'file |
| 472 | :group 'diary) | 453 | :group 'diary) |
| 473 | 454 | ||
| 474 | ;;;###autoload | ||
| 475 | (defcustom diary-nonmarking-symbol "&" | 455 | (defcustom diary-nonmarking-symbol "&" |
| 476 | "Symbol indicating that a diary entry is not to be marked in the calendar." | 456 | "Symbol indicating that a diary entry is not to be marked in the calendar." |
| 477 | :type 'string | 457 | :type 'string |
| 478 | :group 'diary) | 458 | :group 'diary) |
| 479 | 459 | ||
| 480 | ;;;###autoload | ||
| 481 | (defcustom hebrew-diary-entry-symbol "H" | 460 | (defcustom hebrew-diary-entry-symbol "H" |
| 482 | "Symbol indicating a diary entry according to the Hebrew calendar." | 461 | "Symbol indicating a diary entry according to the Hebrew calendar." |
| 483 | :type 'string | 462 | :type 'string |
| 484 | :group 'diary) | 463 | :group 'diary) |
| 485 | 464 | ||
| 486 | ;;;###autoload | ||
| 487 | (defcustom islamic-diary-entry-symbol "I" | 465 | (defcustom islamic-diary-entry-symbol "I" |
| 488 | "Symbol indicating a diary entry according to the Islamic calendar." | 466 | "Symbol indicating a diary entry according to the Islamic calendar." |
| 489 | :type 'string | 467 | :type 'string |
| 490 | :group 'diary) | 468 | :group 'diary) |
| 491 | 469 | ||
| 492 | ;;;###autoload | ||
| 493 | (defcustom bahai-diary-entry-symbol "B" | 470 | (defcustom bahai-diary-entry-symbol "B" |
| 494 | "Symbol indicating a diary entry according to the Baha'i calendar." | 471 | "Symbol indicating a diary entry according to the Baha'i calendar." |
| 495 | :type 'string | 472 | :type 'string |
| 496 | :group 'diary) | 473 | :group 'diary) |
| 497 | 474 | ||
| 498 | ;;;###autoload | ||
| 499 | (defcustom diary-include-string "#include" | 475 | (defcustom diary-include-string "#include" |
| 500 | "The string indicating inclusion of another file of diary entries. | 476 | "The string indicating inclusion of another file of diary entries. |
| 501 | See the documentation for the function `include-other-diary-files'." | 477 | See the documentation for the function `include-other-diary-files'." |
| @@ -503,7 +479,7 @@ See the documentation for the function `include-other-diary-files'." | |||
| 503 | :group 'diary) | 479 | :group 'diary) |
| 504 | 480 | ||
| 505 | (defcustom diary-glob-file-regexp-prefix "^\\#" | 481 | (defcustom diary-glob-file-regexp-prefix "^\\#" |
| 506 | "The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers." | 482 | "Regular expression prepended to attribute-regexps for file-wide specifiers." |
| 507 | :type 'regexp | 483 | :type 'regexp |
| 508 | :group 'diary) | 484 | :group 'diary) |
| 509 | 485 | ||
| @@ -537,14 +513,12 @@ modified." | |||
| 537 | :type 'boolean | 513 | :type 'boolean |
| 538 | :group 'diary) | 514 | :group 'diary) |
| 539 | 515 | ||
| 540 | ;;;###autoload | ||
| 541 | (defcustom sexp-diary-entry-symbol "%%" | 516 | (defcustom sexp-diary-entry-symbol "%%" |
| 542 | "The string used to indicate a sexp diary entry in `diary-file'. | 517 | "The string used to indicate a sexp diary entry in `diary-file'. |
| 543 | See the documentation for the function `list-sexp-diary-entries'." | 518 | See the documentation for the function `list-sexp-diary-entries'." |
| 544 | :type 'string | 519 | :type 'string |
| 545 | :group 'diary) | 520 | :group 'diary) |
| 546 | 521 | ||
| 547 | ;;;###autoload | ||
| 548 | (defcustom abbreviated-calendar-year t | 522 | (defcustom abbreviated-calendar-year t |
| 549 | "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. | 523 | "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. |
| 550 | For the Gregorian calendar; similarly for the Hebrew, Islamic and | 524 | For the Gregorian calendar; similarly for the Hebrew, Islamic and |
| @@ -584,7 +558,6 @@ calendar package is already loaded). Rather, use either | |||
| 584 | (american-calendar))) | 558 | (american-calendar))) |
| 585 | :group 'diary) | 559 | :group 'diary) |
| 586 | 560 | ||
| 587 | ;;;###autoload | ||
| 588 | (defcustom american-date-diary-pattern | 561 | (defcustom american-date-diary-pattern |
| 589 | '((month "/" day "[^/0-9]") | 562 | '((month "/" day "[^/0-9]") |
| 590 | (month "/" day "/" year "[^0-9]") | 563 | (month "/" day "/" year "[^0-9]") |
| @@ -604,7 +577,6 @@ See the documentation of `diary-date-forms' for an explanation." | |||
| 604 | (choice symbol regexp))))) | 577 | (choice symbol regexp))))) |
| 605 | :group 'diary) | 578 | :group 'diary) |
| 606 | 579 | ||
| 607 | ;;;###autoload | ||
| 608 | (defcustom european-date-diary-pattern | 580 | (defcustom european-date-diary-pattern |
| 609 | '((day "/" month "[^/0-9]") | 581 | '((day "/" month "[^/0-9]") |
| 610 | (day "/" month "/" year "[^0-9]") | 582 | (day "/" month "/" year "[^0-9]") |
| @@ -676,7 +648,6 @@ a portion of the first word of the diary entry." | |||
| 676 | (diary)))) | 648 | (diary)))) |
| 677 | :group 'diary) | 649 | :group 'diary) |
| 678 | 650 | ||
| 679 | ;;;###autoload | ||
| 680 | (defcustom european-calendar-display-form | 651 | (defcustom european-calendar-display-form |
| 681 | '((if dayname (concat dayname ", ")) day " " monthname " " year) | 652 | '((if dayname (concat dayname ", ")) day " " monthname " " year) |
| 682 | "Pseudo-pattern governing the way a date appears in the European style. | 653 | "Pseudo-pattern governing the way a date appears in the European style. |
| @@ -684,7 +655,6 @@ See the documentation of `calendar-date-display-form' for an explanation." | |||
| 684 | :type 'sexp | 655 | :type 'sexp |
| 685 | :group 'calendar) | 656 | :group 'calendar) |
| 686 | 657 | ||
| 687 | ;;;###autoload | ||
| 688 | (defcustom american-calendar-display-form | 658 | (defcustom american-calendar-display-form |
| 689 | '((if dayname (concat dayname ", ")) monthname " " day ", " year) | 659 | '((if dayname (concat dayname ", ")) monthname " " day ", " year) |
| 690 | "Pseudo-pattern governing the way a date appears in the American style. | 660 | "Pseudo-pattern governing the way a date appears in the American style. |
| @@ -735,7 +705,6 @@ See the documentation of the function `calendar-date-string'." | |||
| 735 | (setq diary-date-forms american-date-diary-pattern) | 705 | (setq diary-date-forms american-date-diary-pattern) |
| 736 | (update-calendar-mode-line)) | 706 | (update-calendar-mode-line)) |
| 737 | 707 | ||
| 738 | ;;;###autoload | ||
| 739 | (defcustom print-diary-entries-hook 'lpr-buffer | 708 | (defcustom print-diary-entries-hook 'lpr-buffer |
| 740 | "List of functions called after a temporary diary buffer is prepared. | 709 | "List of functions called after a temporary diary buffer is prepared. |
| 741 | The buffer shows only the diary entries currently visible in the diary | 710 | The buffer shows only the diary entries currently visible in the diary |
| @@ -745,7 +714,6 @@ instead of deleting it, or changing the function used to do the printing." | |||
| 745 | :type 'hook | 714 | :type 'hook |
| 746 | :group 'diary) | 715 | :group 'diary) |
| 747 | 716 | ||
| 748 | ;;;###autoload | ||
| 749 | (defcustom list-diary-entries-hook nil | 717 | (defcustom list-diary-entries-hook nil |
| 750 | "List of functions called after diary file is culled for relevant entries. | 718 | "List of functions called after diary file is culled for relevant entries. |
| 751 | It is to be used for diary entries that are not found in the diary file. | 719 | It is to be used for diary entries that are not found in the diary file. |
| @@ -776,7 +744,6 @@ lexicographic order." | |||
| 776 | :options '(include-other-diary-files sort-diary-entries) | 744 | :options '(include-other-diary-files sort-diary-entries) |
| 777 | :group 'diary) | 745 | :group 'diary) |
| 778 | 746 | ||
| 779 | ;;;###autoload | ||
| 780 | (defcustom diary-hook nil | 747 | (defcustom diary-hook nil |
| 781 | "List of functions called after the display of the diary. | 748 | "List of functions called after the display of the diary. |
| 782 | Can be used for appointment notification." | 749 | Can be used for appointment notification." |
| @@ -785,7 +752,6 @@ Can be used for appointment notification." | |||
| 785 | 752 | ||
| 786 | (autoload 'diary-set-maybe-redraw "diary-lib") | 753 | (autoload 'diary-set-maybe-redraw "diary-lib") |
| 787 | 754 | ||
| 788 | ;;;###autoload | ||
| 789 | (defcustom diary-display-hook nil | 755 | (defcustom diary-display-hook nil |
| 790 | "List of functions that handle the display of the diary. | 756 | "List of functions that handle the display of the diary. |
| 791 | If nil (the default), `simple-diary-display' is used. Use `ignore' for no | 757 | If nil (the default), `simple-diary-display' is used. Use `ignore' for no |
| @@ -813,7 +779,6 @@ diary buffer, set the variable `diary-list-include-blanks' to t." | |||
| 813 | :set 'diary-set-maybe-redraw | 779 | :set 'diary-set-maybe-redraw |
| 814 | :group 'diary) | 780 | :group 'diary) |
| 815 | 781 | ||
| 816 | ;;;###autoload | ||
| 817 | (defcustom nongregorian-diary-listing-hook nil | 782 | (defcustom nongregorian-diary-listing-hook nil |
| 818 | "List of functions called for listing diary file and included files. | 783 | "List of functions called for listing diary file and included files. |
| 819 | As the files are processed for diary entries, these functions are used | 784 | As the files are processed for diary entries, these functions are used |
| @@ -827,7 +792,6 @@ describes the style of such diary entries." | |||
| 827 | diary-bahai-list-entries) | 792 | diary-bahai-list-entries) |
| 828 | :group 'diary) | 793 | :group 'diary) |
| 829 | 794 | ||
| 830 | ;;;###autoload | ||
| 831 | (defcustom mark-diary-entries-hook nil | 795 | (defcustom mark-diary-entries-hook nil |
| 832 | "List of functions called after marking diary entries in the calendar. | 796 | "List of functions called after marking diary entries in the calendar. |
| 833 | 797 | ||
| @@ -845,7 +809,6 @@ function `include-other-diary-files' as part of `list-diary-entries-hook'." | |||
| 845 | :options '(mark-included-diary-files) | 809 | :options '(mark-included-diary-files) |
| 846 | :group 'diary) | 810 | :group 'diary) |
| 847 | 811 | ||
| 848 | ;;;###autoload | ||
| 849 | (defcustom nongregorian-diary-marking-hook nil | 812 | (defcustom nongregorian-diary-marking-hook nil |
| 850 | "List of functions called for marking diary file and included files. | 813 | "List of functions called for marking diary file and included files. |
| 851 | As the files are processed for diary entries, these functions are used | 814 | As the files are processed for diary entries, these functions are used |
| @@ -859,7 +822,6 @@ describes the style of such diary entries." | |||
| 859 | diary-bahai-mark-entries) | 822 | diary-bahai-mark-entries) |
| 860 | :group 'diary) | 823 | :group 'diary) |
| 861 | 824 | ||
| 862 | ;;;###autoload | ||
| 863 | (defcustom diary-list-include-blanks nil | 825 | (defcustom diary-list-include-blanks nil |
| 864 | "If nil, do not include days with no diary entry in the list of diary entries. | 826 | "If nil, do not include days with no diary entry in the list of diary entries. |
| 865 | Such days will then not be shown in the fancy diary buffer, even if they | 827 | Such days will then not be shown in the fancy diary buffer, even if they |
| @@ -867,7 +829,6 @@ are holidays." | |||
| 867 | :type 'boolean | 829 | :type 'boolean |
| 868 | :group 'diary) | 830 | :group 'diary) |
| 869 | 831 | ||
| 870 | ;;;###autoload | ||
| 871 | (defcustom holidays-in-diary-buffer t | 832 | (defcustom holidays-in-diary-buffer t |
| 872 | "Non-nil means include holidays in the diary display. | 833 | "Non-nil means include holidays in the diary display. |
| 873 | The holidays appear in the mode line of the diary buffer, or in the | 834 | The holidays appear in the mode line of the diary buffer, or in the |
| @@ -880,7 +841,6 @@ somewhat; setting it to nil makes the diary display faster." | |||
| 880 | 841 | ||
| 881 | ;;;###autoload | 842 | ;;;###autoload |
| 882 | (put 'general-holidays 'risky-local-variable t) | 843 | (put 'general-holidays 'risky-local-variable t) |
| 883 | ;;;###autoload | ||
| 884 | (defcustom general-holidays | 844 | (defcustom general-holidays |
| 885 | '((holiday-fixed 1 1 "New Year's Day") | 845 | '((holiday-fixed 1 1 "New Year's Day") |
| 886 | (holiday-float 1 1 3 "Martin Luther King Day") | 846 | (holiday-float 1 1 3 "Martin Luther King Day") |
| @@ -906,7 +866,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 906 | 866 | ||
| 907 | ;;;###autoload | 867 | ;;;###autoload |
| 908 | (put 'oriental-holidays 'risky-local-variable t) | 868 | (put 'oriental-holidays 'risky-local-variable t) |
| 909 | ;;;###autoload | ||
| 910 | (defcustom oriental-holidays | 869 | (defcustom oriental-holidays |
| 911 | '((if (fboundp 'atan) | 870 | '((if (fboundp 'atan) |
| 912 | (holiday-chinese-new-year))) | 871 | (holiday-chinese-new-year))) |
| @@ -917,7 +876,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 917 | 876 | ||
| 918 | ;;;###autoload | 877 | ;;;###autoload |
| 919 | (put 'local-holidays 'risky-local-variable t) | 878 | (put 'local-holidays 'risky-local-variable t) |
| 920 | ;;;###autoload | ||
| 921 | (defcustom local-holidays nil | 879 | (defcustom local-holidays nil |
| 922 | "Local holidays. | 880 | "Local holidays. |
| 923 | See the documentation for `calendar-holidays' for details." | 881 | See the documentation for `calendar-holidays' for details." |
| @@ -926,7 +884,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 926 | 884 | ||
| 927 | ;;;###autoload | 885 | ;;;###autoload |
| 928 | (put 'other-holidays 'risky-local-variable t) | 886 | (put 'other-holidays 'risky-local-variable t) |
| 929 | ;;;###autoload | ||
| 930 | (defcustom other-holidays nil | 887 | (defcustom other-holidays nil |
| 931 | "User defined holidays. | 888 | "User defined holidays. |
| 932 | See the documentation for `calendar-holidays' for details." | 889 | See the documentation for `calendar-holidays' for details." |
| @@ -935,7 +892,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 935 | 892 | ||
| 936 | ;;;###autoload | 893 | ;;;###autoload |
| 937 | (put 'hebrew-holidays-1 'risky-local-variable t) | 894 | (put 'hebrew-holidays-1 'risky-local-variable t) |
| 938 | ;;;###autoload | ||
| 939 | (defvar hebrew-holidays-1 | 895 | (defvar hebrew-holidays-1 |
| 940 | '((holiday-rosh-hashanah-etc) | 896 | '((holiday-rosh-hashanah-etc) |
| 941 | (if all-hebrew-calendar-holidays | 897 | (if all-hebrew-calendar-holidays |
| @@ -955,7 +911,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 955 | 911 | ||
| 956 | ;;;###autoload | 912 | ;;;###autoload |
| 957 | (put 'hebrew-holidays-2 'risky-local-variable t) | 913 | (put 'hebrew-holidays-2 'risky-local-variable t) |
| 958 | ;;;###autoload | ||
| 959 | (defvar hebrew-holidays-2 | 914 | (defvar hebrew-holidays-2 |
| 960 | '((if all-hebrew-calendar-holidays | 915 | '((if all-hebrew-calendar-holidays |
| 961 | (holiday-hanukkah) | 916 | (holiday-hanukkah) |
| @@ -977,7 +932,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 977 | 932 | ||
| 978 | ;;;###autoload | 933 | ;;;###autoload |
| 979 | (put 'hebrew-holidays-3 'risky-local-variable t) | 934 | (put 'hebrew-holidays-3 'risky-local-variable t) |
| 980 | ;;;###autoload | ||
| 981 | (defvar hebrew-holidays-3 | 935 | (defvar hebrew-holidays-3 |
| 982 | '((if all-hebrew-calendar-holidays | 936 | '((if all-hebrew-calendar-holidays |
| 983 | (holiday-hebrew | 937 | (holiday-hebrew |
| @@ -1010,7 +964,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1010 | 964 | ||
| 1011 | ;;;###autoload | 965 | ;;;###autoload |
| 1012 | (put 'hebrew-holidays-4 'risky-local-variable t) | 966 | (put 'hebrew-holidays-4 'risky-local-variable t) |
| 1013 | ;;;###autoload | ||
| 1014 | (defvar hebrew-holidays-4 | 967 | (defvar hebrew-holidays-4 |
| 1015 | '((holiday-passover-etc) | 968 | '((holiday-passover-etc) |
| 1016 | (if (and all-hebrew-calendar-holidays | 969 | (if (and all-hebrew-calendar-holidays |
| @@ -1029,7 +982,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1029 | 982 | ||
| 1030 | ;;;###autoload | 983 | ;;;###autoload |
| 1031 | (put 'hebrew-holidays 'risky-local-variable t) | 984 | (put 'hebrew-holidays 'risky-local-variable t) |
| 1032 | ;;;###autoload | ||
| 1033 | (defcustom hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 | 985 | (defcustom hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 |
| 1034 | hebrew-holidays-3 hebrew-holidays-4) | 986 | hebrew-holidays-3 hebrew-holidays-4) |
| 1035 | "Jewish holidays. | 987 | "Jewish holidays. |
| @@ -1039,7 +991,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1039 | 991 | ||
| 1040 | ;;;###autoload | 992 | ;;;###autoload |
| 1041 | (put 'christian-holidays 'risky-local-variable t) | 993 | (put 'christian-holidays 'risky-local-variable t) |
| 1042 | ;;;###autoload | ||
| 1043 | (defcustom christian-holidays | 994 | (defcustom christian-holidays |
| 1044 | '((if all-christian-calendar-holidays | 995 | '((if all-christian-calendar-holidays |
| 1045 | (holiday-fixed 1 6 "Epiphany")) | 996 | (holiday-fixed 1 6 "Epiphany")) |
| @@ -1090,7 +1041,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1090 | 1041 | ||
| 1091 | ;;;###autoload | 1042 | ;;;###autoload |
| 1092 | (put 'islamic-holidays 'risky-local-variable t) | 1043 | (put 'islamic-holidays 'risky-local-variable t) |
| 1093 | ;;;###autoload | ||
| 1094 | (defcustom islamic-holidays | 1044 | (defcustom islamic-holidays |
| 1095 | '((holiday-islamic | 1045 | '((holiday-islamic |
| 1096 | 1 1 | 1046 | 1 1 |
| @@ -1125,7 +1075,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1125 | 1075 | ||
| 1126 | ;;;###autoload | 1076 | ;;;###autoload |
| 1127 | (put 'bahai-holidays 'risky-local-variable t) | 1077 | (put 'bahai-holidays 'risky-local-variable t) |
| 1128 | ;;;###autoload | ||
| 1129 | (defcustom bahai-holidays | 1078 | (defcustom bahai-holidays |
| 1130 | '((holiday-fixed | 1079 | '((holiday-fixed |
| 1131 | 3 21 | 1080 | 3 21 |
| @@ -1167,7 +1116,6 @@ See the documentation for `calendar-holidays' for details." | |||
| 1167 | 1116 | ||
| 1168 | ;;;###autoload | 1117 | ;;;###autoload |
| 1169 | (put 'solar-holidays 'risky-local-variable t) | 1118 | (put 'solar-holidays 'risky-local-variable t) |
| 1170 | ;;;###autoload | ||
| 1171 | (defcustom solar-holidays | 1119 | (defcustom solar-holidays |
| 1172 | '((if (fboundp 'atan) | 1120 | '((if (fboundp 'atan) |
| 1173 | (solar-equinoxes-solstices)) | 1121 | (solar-equinoxes-solstices)) |
| @@ -1575,7 +1523,6 @@ return negative results." | |||
| 1575 | (autoload 'calendar-two-frame-setup "cal-x" | 1523 | (autoload 'calendar-two-frame-setup "cal-x" |
| 1576 | "Start calendar and diary in separate, dedicated frames.") | 1524 | "Start calendar and diary in separate, dedicated frames.") |
| 1577 | 1525 | ||
| 1578 | ;;;###autoload | ||
| 1579 | (defcustom calendar-setup nil | 1526 | (defcustom calendar-setup nil |
| 1580 | "The frame setup of the calendar. | 1527 | "The frame setup of the calendar. |
| 1581 | The choices are: `one-frame' (calendar and diary together in one separate, | 1528 | The choices are: `one-frame' (calendar and diary together in one separate, |
| @@ -1596,6 +1543,30 @@ three options overrides the value of `view-diary-entries-initially'." | |||
| 1596 | :version "22.1" | 1543 | :version "22.1" |
| 1597 | :group 'calendar) | 1544 | :group 'calendar) |
| 1598 | 1545 | ||
| 1546 | (defcustom calendar-week-start-day 0 | ||
| 1547 | "The day of the week on which a week in the calendar begins. | ||
| 1548 | 0 means Sunday (default), 1 means Monday, and so on. | ||
| 1549 | |||
| 1550 | If you change this variable directly (without using customize) | ||
| 1551 | after starting `calendar', you should call `redraw-calendar' to | ||
| 1552 | update the calendar display to reflect the change, otherwise | ||
| 1553 | movement commands will not work correctly." | ||
| 1554 | :type 'integer | ||
| 1555 | ;; Change the initialize so that if you reload calendar.el, it will not | ||
| 1556 | ;; cause a redraw (which may fail, e.g. with "invalid byte-code in | ||
| 1557 | ;; calendar.elc" because of the "byte-compile-dynamic"). | ||
| 1558 | :initialize 'custom-initialize-default | ||
| 1559 | :set (lambda (sym val) | ||
| 1560 | (set sym val) | ||
| 1561 | (redraw-calendar)) | ||
| 1562 | :group 'calendar) | ||
| 1563 | |||
| 1564 | (defcustom calendar-debug-sexp nil | ||
| 1565 | "Turn debugging on when evaluating a sexp in the diary or holiday list." | ||
| 1566 | :type 'boolean | ||
| 1567 | :group 'calendar) | ||
| 1568 | |||
| 1569 | |||
| 1599 | ;;;###autoload | 1570 | ;;;###autoload |
| 1600 | (defun calendar (&optional arg) | 1571 | (defun calendar (&optional arg) |
| 1601 | "Choose between the one frame, two frame, or basic calendar displays. | 1572 | "Choose between the one frame, two frame, or basic calendar displays. |
| @@ -2189,30 +2160,6 @@ the inserted text. Value is always t." | |||
| 2189 | (generate-calendar-window displayed-month displayed-year) | 2160 | (generate-calendar-window displayed-month displayed-year) |
| 2190 | (calendar-cursor-to-visible-date cursor-date))))) | 2161 | (calendar-cursor-to-visible-date cursor-date))))) |
| 2191 | 2162 | ||
| 2192 | ;;;###autoload | ||
| 2193 | (defcustom calendar-week-start-day 0 | ||
| 2194 | "The day of the week on which a week in the calendar begins. | ||
| 2195 | 0 means Sunday (default), 1 means Monday, and so on. | ||
| 2196 | |||
| 2197 | If you change this variable directly (without using customize) | ||
| 2198 | after starting `calendar', you should call `redraw-calendar' to | ||
| 2199 | update the calendar display to reflect the change, otherwise | ||
| 2200 | movement commands will not work correctly." | ||
| 2201 | :type 'integer | ||
| 2202 | ;; Change the initialize so that if you reload calendar.el, it will not | ||
| 2203 | ;; cause a redraw (which may fail, e.g. with "invalid byte-code in | ||
| 2204 | ;; calendar.elc" because of the "byte-compile-dynamic"). | ||
| 2205 | :initialize 'custom-initialize-default | ||
| 2206 | :set (lambda (sym val) | ||
| 2207 | (set sym val) | ||
| 2208 | (redraw-calendar)) | ||
| 2209 | :group 'calendar) | ||
| 2210 | |||
| 2211 | (defcustom calendar-debug-sexp nil | ||
| 2212 | "Turn debugging on when evaluating a sexp in the diary or holiday list." | ||
| 2213 | :type 'boolean | ||
| 2214 | :group 'calendar) | ||
| 2215 | |||
| 2216 | (require 'cal-menu) | 2163 | (require 'cal-menu) |
| 2217 | 2164 | ||
| 2218 | (defvar calendar-mode-map | 2165 | (defvar calendar-mode-map |
| @@ -2445,24 +2392,10 @@ under the cursor: | |||
| 2445 | (select-window (posn-window (event-start event))) | 2392 | (select-window (posn-window (event-start event))) |
| 2446 | (call-interactively 'calendar-other-month))) | 2393 | (call-interactively 'calendar-other-month))) |
| 2447 | 2394 | ||
| 2448 | ;; (require 'info) will define these. | ||
| 2449 | (declare-function Info-find-emacs-command-nodes "info" (command)) | ||
| 2450 | (declare-function Info-find-node "info" | ||
| 2451 | (filename nodename &optional no-going-back)) | ||
| 2452 | |||
| 2453 | (defun calendar-goto-info-node () | 2395 | (defun calendar-goto-info-node () |
| 2454 | "Go to the info node for the calendar." | 2396 | "Go to the info node for the calendar." |
| 2455 | (interactive) | 2397 | (interactive) |
| 2456 | (require 'info) | 2398 | (info "(emacs)Calendar/Diary")) |
| 2457 | (let ((where (save-window-excursion | ||
| 2458 | (Info-find-emacs-command-nodes 'calendar)))) | ||
| 2459 | (if (not where) | ||
| 2460 | (error "Couldn't find documentation for the calendar") | ||
| 2461 | (let (same-window-buffer-names) | ||
| 2462 | (info)) | ||
| 2463 | (Info-find-node (car (car where)) (car (cdr (car where))))))) | ||
| 2464 | |||
| 2465 | |||
| 2466 | 2399 | ||
| 2467 | (defun calendar-mode () | 2400 | (defun calendar-mode () |
| 2468 | "A major mode for the calendar window. | 2401 | "A major mode for the calendar window. |
| @@ -3175,6 +3108,14 @@ Defaults to today's date if DATE is not given." | |||
| 3175 | "Non-negative remainder of M/N with N instead of 0." | 3108 | "Non-negative remainder of M/N with N instead of 0." |
| 3176 | (1+ (mod (1- m) n))) | 3109 | (1+ (mod (1- m) n))) |
| 3177 | 3110 | ||
| 3111 | |||
| 3112 | (defun calendar-version () | ||
| 3113 | (interactive) | ||
| 3114 | (message "GNU Emacs %s" emacs-version)) | ||
| 3115 | |||
| 3116 | (make-obsolete 'calendar-version 'emacs-version "23.1") | ||
| 3117 | |||
| 3118 | |||
| 3178 | (run-hooks 'calendar-load-hook) | 3119 | (run-hooks 'calendar-load-hook) |
| 3179 | 3120 | ||
| 3180 | (provide 'calendar) | 3121 | (provide 'calendar) |