• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/calendar/

Lines Matching +defs:calendar +defs:mode +defs:map

8 ;; Keywords: calendar
30 ;; in calendar.el.
34 (require 'calendar)
54 (let ((date (calendar-current-date)))
62 in the displayed three-month calendar."
65 (diary-list-entries (calendar-cursor-to-date t) arg))
70 by the cursor position in the displayed three-month calendar.
78 (autoload 'check-calendar-holidays "holidays"
81 The holidays are those in the list `calendar-holidays'.")
83 (autoload 'calendar-holiday-list "holidays"
84 "Form the list of holidays that occur on dates in the calendar window.
85 The holidays are those in the list `calendar-holidays'.")
88 "French calendar equivalent of date diary entry.")
91 "Mayan calendar equivalent of date diary entry.")
94 "ISO calendar equivalent of date diary entry.")
97 "Julian calendar equivalent of date diary entry.")
103 "Chinese calendar equivalent of date diary entry.")
106 "Islamic calendar equivalent of date diary entry.")
112 "Mark days in the calendar window that have Islamic date diary entries.")
114 (autoload 'mark-islamic-calendar-date-pattern "cal-islam"
115 "Mark dates in calendar window that conform to Islamic date MONTH/DAY/YEAR.")
118 "Baha'i calendar equivalent of date diary entry.")
124 "Mark days in the calendar window that have Baha'i date diary entries.")
126 (autoload 'mark-bahai-calendar-date-pattern "cal-bahai"
127 "Mark dates in calendar window that conform to Baha'i date MONTH/DAY/YEAR.")
130 "Hebrew calendar equivalent of date diary entry.")
148 "Mark days in the calendar window that have Hebrew date diary entries.")
150 (autoload 'mark-hebrew-calendar-date-pattern "cal-hebrew"
151 "Mark dates in calendar window that conform to Hebrew date MONTH/DAY/YEAR.")
154 "Coptic calendar equivalent of date diary entry.")
157 "Ethiopic calendar equivalent of date diary entry.")
160 "Persian calendar equivalent of date diary entry.")
177 It is the standard syntax table used in Fundamental mode, but with the
286 '(:eval (calendar-string-spread
288 "Selective display active - press \"s\" in calendar \
335 from the calendar; in that case, the prefix argument controls the
424 (aref number-of-diary-entries (calendar-day-of-week date))
430 (date-string (calendar-date-string date))
441 (if (eq major-mode default-major-mode)
442 (diary-mode)
445 ;; take effect. Unconditionally calling (diary-mode)
449 (if (eq major-mode 'diary-mode)
464 (calendar-for-loop
466 (let ((month (extract-calendar-month date))
467 (day (extract-calendar-day date))
468 (year (extract-calendar-year date))
477 (calendar-day-name date)
478 (calendar-day-name date 'abbrev)))
481 (calendar-month-name month)
482 (calendar-month-name month 'abbrev)))
488 (if abbreviated-calendar-year
543 (calendar-gregorian-from-absolute
544 (1+ (calendar-absolute-from-gregorian date))))
559 (kill-local-variable 'mode-line-format))
602 (check-calendar-holidays original-date)))
608 ;; If selected window is dedicated (to the calendar),
611 (calendar-set-mode-line (format "Diary for %s" hol-string))
619 (calendar-set-mode-line date-string)
661 (when (eq major-mode default-major-mode) (diary-mode))
680 (check-calendar-holidays original-date)))
704 (if (not (calendar-date-equal date (car (car entry-list))))
708 (calendar-date-compare
710 (calendar-last-day-of-month
717 (extract-calendar-month date))
719 (extract-calendar-year date))
721 (increment-calendar-month
727 (calendar-holiday-list)))
728 (increment-calendar-month
730 (let* ((date-string (calendar-date-string date))
736 (if (calendar-date-equal date (car (car h)))
798 (fancy-diary-display-mode)
799 (calendar-set-mode-line date-string)
806 (calendar-set-mode-line "Diary Entries")
816 visible lines of the diary buffer, add a heading line composed from the mode
834 (if (not (stringp mode-line-format))
836 (string-match "^-*\\([^-].*[^-]\\)-*$" mode-line-format)
837 (match-string 1 mode-line-format)))
870 (when (eq major-mode default-major-mode) (diary-mode))
903 european-calendar-style t \\
916 (diary-list-entries (calendar-current-date) (or ndays diary-mail-days)))
919 (calendar-date-string (calendar-current-date))))
929 `calendar-abbrev-construct' is used to construct abbreviations from the
935 (calendar-abbrev-construct abbrev-array
938 (calendar-abbrev-construct abbrev-array
951 "Mark days in the calendar window that have diary entries.
952 Each entry in the diary file visible in the calendar window is
963 ;; ii) called via calendar-redraw (since calendar has already been
966 (when (and redraw mark-diary-entries-in-calendar)
967 (setq mark-diary-entries-in-calendar nil)
968 (redraw-calendar))
973 (when (eq major-mode default-major-mode) (diary-mode))
974 (setq mark-diary-entries-in-calendar t)
982 (diary-name-pattern calendar-day-name-array
983 calendar-day-abbrev-array))
986 (diary-name-pattern calendar-month-name-array
987 calendar-month-abbrev-array)))
1029 abbreviated-calendar-year)
1031 (extract-calendar-year
1032 (calendar-current-date)))
1048 (mark-calendar-days-named
1051 (calendar-make-alist
1052 calendar-day-name-array
1053 0 nil calendar-day-abbrev-array) t)) marks)
1059 (calendar-make-alist
1060 calendar-month-name-array
1061 1 nil calendar-month-abbrev-array) t)))))
1062 (mark-calendar-date-pattern mm dd yy marks))))))
1069 "Mark days in the calendar window that have sexp diary entries.
1070 Each entry in the diary file (or included files) visible in the calendar window
1079 (with-current-buffer calendar-buffer
1082 (increment-calendar-month m y -1)
1084 (calendar-absolute-from-gregorian (list m 1 y)))
1085 (increment-calendar-month m y 2)
1087 (calendar-absolute-from-gregorian
1088 (list m (calendar-last-day-of-month m y) y)))
1119 (calendar-for-loop date from first-date to last-date do
1121 (calendar-gregorian-from-absolute date)))
1125 (mark-visible-calendar-date
1126 (calendar-gregorian-from-absolute date)
1166 (defun mark-calendar-days-named (dayname &optional color)
1167 "Mark all dates in the calendar window that are day DAYNAME of the week.
1169 (with-current-buffer calendar-buffer
1176 (increment-calendar-month succ-month succ-year 1)
1177 (increment-calendar-month prev-month prev-year -1)
1178 (setq day (calendar-absolute-from-gregorian
1179 (calendar-nth-named-day 1 dayname prev-month prev-year)))
1180 (setq last-day (calendar-absolute-from-gregorian
1181 (calendar-nth-named-day -1 dayname succ-month succ-year)))
1183 (mark-visible-calendar-date (calendar-gregorian-from-absolute day) color)
1186 (defun mark-calendar-date-pattern (month day year &optional color)
1187 "Mark all dates in the calendar window that conform to MONTH/DAY/YEAR.
1189 (with-current-buffer calendar-buffer
1192 (increment-calendar-month m y -1)
1193 (calendar-for-loop i from 0 to 2 do
1194 (mark-calendar-month m y month day year color)
1195 (increment-calendar-month m y 1)))))
1197 (defun mark-calendar-month (month year p-month p-day p-year &optional color)
1205 (calendar-for-loop
1206 i from 1 to (calendar-last-day-of-month month year) do
1207 (mark-visible-calendar-date (list month i year) color))
1208 (mark-visible-calendar-date (list month p-day year) color))))
1216 (or (calendar-date-compare e1 e2)
1217 (and (calendar-date-equal (car e1) (car e2))
1281 &%%(let ((dayname (calendar-day-of-week date))
1282 (day (extract-calendar-day date)))
1292 `european-calendar-style' is nil, and DAY, MONTH, YEAR if
1293 `european-calendar-style' is t. DAY, MONTH, and YEAR
1297 when highlighting the day in the calendar.
1308 string to use when highlighting the day in the calendar.
1312 inclusive. (If `european-calendar-style' is t, the
1316 day in the calendar.
1320 (If `european-calendar-style' is t, the order of the
1328 string to use when highlighting the day in the calendar.
1332 (If `european-calendar-style' is t, the order of the
1339 to use when highlighting the day in the calendar.
1350 *reminders* are marked on the calendar. Marking of
1404 the date of death on the *civil* calendar. The diary entry
1406 day before. (If `european-calendar-style' is t, the order
1411 the Hebrew calendar. Note that since there is no text, it
1487 (let ((result (if calendar-debug-sexp
1506 Entry applies if date is MONTH, DAY, YEAR if `european-calendar-style' is nil,
1507 and DAY, MONTH, YEAR if `european-calendar-style' is t. DAY, MONTH, and YEAR
1512 use when highlighting the day in the calendar."
1513 (let ((dd (if european-calendar-style
1516 (mm (if european-calendar-style
1519 (m (extract-calendar-month date))
1520 (y (extract-calendar-year date))
1521 (d (extract-calendar-day date)))
1538 M1, D1, Y1, M2, D2, Y2 if `european-calendar-style' is nil, and
1539 D1, M1, Y1, D2, M2, Y2 if `european-calendar-style' is t.
1542 use when highlighting the day in the calendar."
1544 (let ((date1 (calendar-absolute-from-gregorian
1545 (if european-calendar-style
1548 (date2 (calendar-absolute-from-gregorian
1549 (if european-calendar-style
1552 (d (calendar-absolute-from-gregorian date)))
1564 highlighting the day in the calendar."
1569 (and (= dayname (calendar-day-of-week date))
1570 (let* ((m (extract-calendar-month date))
1571 (d (extract-calendar-day date))
1572 (y (extract-calendar-year date))
1574 (calendar-nth-named-absday (- n) dayname m y d))
1577 (last (calendar-gregorian-from-absolute last-abs))
1578 (first (calendar-gregorian-from-absolute first-abs))
1580 (m1 (extract-calendar-month first))
1581 (d1 (extract-calendar-day first))
1582 (y1 (extract-calendar-year first))
1584 (m2 (extract-calendar-month last))
1585 (d2 (extract-calendar-day last))
1586 (y2 (extract-calendar-year last)))
1594 (calendar-last-day-of-month m1 y1)))))
1608 (calendar-last-day-of-month m1 y1)))))
1616 (calendar-last-day-of-month m2 y2)))
1624 `european-calendar-style' is nil, and DAY, MONTH, YEAR if
1625 `european-calendar-style' is t. Diary entry can contain `%d' or `%d%s'; the
1632 use when highlighting the day in the calendar."
1633 (let* ((d (if european-calendar-style
1636 (m (if european-calendar-style
1639 (y (extract-calendar-year date))
1641 (if (and (= m 2) (= d 29) (not (calendar-leap-year-p y)))
1644 (if (and (> diff 0) (calendar-date-equal (list m d y) date))
1649 If `european-calendar-style' is t, parameters are N, DAY, MONTH, YEAR.
1656 use when highlighting the day in the calendar."
1657 (let* ((d (if european-calendar-style
1660 (m (if european-calendar-style
1663 (diff (- (calendar-absolute-from-gregorian date)
1664 (calendar-absolute-from-gregorian
1679 (calendar-day-of-year-string date))
1712 marked on the calendar."
1723 (let ((date (calendar-gregorian-from-absolute
1724 (+ (calendar-absolute-from-gregorian date) days))))
1734 (defun diary-redraw-calendar ()
1735 "If `calendar-buffer' is live and diary entries are marked, redraw it."
1736 (and mark-diary-entries-in-calendar
1738 (redraw-calendar)))
1748 (when (eq major-mode default-major-mode) (diary-mode))
1768 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t t)
1775 (make-diary-entry (calendar-day-name (calendar-cursor-to-date t))
1782 (let ((calendar-date-display-form
1783 (if european-calendar-style
1786 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t)
1793 (let ((calendar-date-display-form
1794 (if european-calendar-style
1797 (make-diary-entry (calendar-date-string (calendar-cursor-to-date t) t)
1804 (let ((calendar-date-display-form
1805 (if european-calendar-style
1811 (calendar-date-string (calendar-cursor-to-date t) nil t))
1818 (let ((calendar-date-display-form
1819 (if european-calendar-style
1822 (cursor (calendar-cursor-to-date t))
1823 (mark (or (car calendar-mark-ring)
1826 (if (< (calendar-absolute-from-gregorian mark)
1827 (calendar-absolute-from-gregorian cursor))
1835 (calendar-date-string start nil t)
1836 (calendar-date-string end nil t))
1843 (let ((calendar-date-display-form
1844 (if european-calendar-style
1850 (calendar-read "Repeat every how many days: "
1852 (calendar-date-string (calendar-cursor-to-date t) nil t))
1855 (defvar diary-mode-map
1856 (let ((map (make-sparse-keymap)))
1857 (define-key map "\C-c\C-s" 'diary-show-all-entries)
1858 (define-key map "\C-c\C-q" 'quit-window)
1859 map)
1860 "Keymap for `diary-mode'.")
1863 (define-derived-mode diary-mode fundamental-mode "Diary"
1864 "Major mode for editing the diary file."
1868 (add-hook 'after-save-hook 'diary-redraw-calendar nil t)
1875 (let ((dayname (diary-name-pattern calendar-day-name-array nil t))
1876 (monthname (diary-name-pattern calendar-month-name-array nil t))
1880 (mapconcat 'eval calendar-date-display-form ""))
1942 (define-derived-mode fancy-diary-display-mode fundamental-mode
1944 "Major mode used while displaying diary entries using Fancy Display."
1972 from this array by the function `calendar-abbrev-construct' are
1975 (let ((dayname (diary-name-pattern calendar-day-name-array
1976 calendar-day-abbrev-array t))
2006 (diary-font-lock-date-forms calendar-month-name-array
2007 nil calendar-month-abbrev-array)
2014 calendar-hebrew-month-name-array-leap-year
2022 calendar-islamic-month-name-array
2049 "Forms to highlight in `diary-mode'.")
2145 ((eq major-mode 'rmail-mode)
2147 ((memq major-mode '(gnus-summary-mode gnus-article-mode))
2149 (t (error "Don't know how to snarf in `%s'" major-mode)))))