diff options
| author | Juanma Barranquero | 2008-03-06 15:01:24 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-03-06 15:01:24 +0000 |
| commit | 0368765ef3224c30d6202d3ee9c859a2fa894e66 (patch) | |
| tree | e8d83756e84c1f2626a4c5332ac31a1bac28749b | |
| parent | e6e78fb57a66d03cd51211f12a9806f83f835667 (diff) | |
| download | emacs-0368765ef3224c30d6202d3ee9c859a2fa894e66.tar.gz emacs-0368765ef3224c30d6202d3ee9c859a2fa894e66.zip | |
(calendar-date-is-legal-p): New obsolete alias.
(calendar-date-is-valid-p): Rename from `calendar-date-is-legal-p'.
(calendar-date-is-visible-p, mark-visible-calendar-date): Use it.
| -rw-r--r-- | lisp/calendar/calendar.el | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 5e8b5b7754b..0525f193ec2 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1676,7 +1676,7 @@ to be replaced by asterisks to highlight it whenever it is in the window." | |||
| 1676 | (month (extract-calendar-month date)) | 1676 | (month (extract-calendar-month date)) |
| 1677 | (year (extract-calendar-year date))) | 1677 | (year (extract-calendar-year date))) |
| 1678 | ;; (calendar-read-date t) returns a date with day = nil, which is | 1678 | ;; (calendar-read-date t) returns a date with day = nil, which is |
| 1679 | ;; not a legal date for the visible test in the diary section. | 1679 | ;; not a valid date for the visible test in the diary section. |
| 1680 | (if arg (setcar (cdr date) 1)) | 1680 | (if arg (setcar (cdr date) 1)) |
| 1681 | (increment-calendar-month month year (- calendar-offset)) | 1681 | (increment-calendar-month month year (- calendar-offset)) |
| 1682 | ;; Display the buffer before calling generate-calendar-window so that it | 1682 | ;; Display the buffer before calling generate-calendar-window so that it |
| @@ -2092,7 +2092,7 @@ Or, for optional MON, YR." | |||
| 2092 | font-lock-mode) | 2092 | font-lock-mode) |
| 2093 | (font-lock-fontify-buffer)) | 2093 | (font-lock-fontify-buffer)) |
| 2094 | (and mark-holidays-in-calendar | 2094 | (and mark-holidays-in-calendar |
| 2095 | ;;; (calendar-date-is-legal-p today) ; useful for BC dates | 2095 | ;;; (calendar-date-is-valid-p today) ; useful for BC dates |
| 2096 | (mark-calendar-holidays) | 2096 | (mark-calendar-holidays) |
| 2097 | (and in-calendar-window (sit-for 0))) | 2097 | (and in-calendar-window (sit-for 0))) |
| 2098 | (unwind-protect | 2098 | (unwind-protect |
| @@ -2352,7 +2352,7 @@ movement commands will not work correctly." | |||
| 2352 | (easy-menu-define nil map nil cal-menu-holidays-menu) | 2352 | (easy-menu-define nil map nil cal-menu-holidays-menu) |
| 2353 | (easy-menu-define nil map nil cal-menu-goto-menu) | 2353 | (easy-menu-define nil map nil cal-menu-goto-menu) |
| 2354 | (easy-menu-define nil map nil cal-menu-scroll-menu) | 2354 | (easy-menu-define nil map nil cal-menu-scroll-menu) |
| 2355 | 2355 | ||
| 2356 | (define-key map [down-mouse-3] | 2356 | (define-key map [down-mouse-3] |
| 2357 | (easy-menu-binding cal-menu-context-mouse-menu)) | 2357 | (easy-menu-binding cal-menu-context-mouse-menu)) |
| 2358 | (define-key map [down-mouse-2] | 2358 | (define-key map [down-mouse-2] |
| @@ -2927,9 +2927,9 @@ interpreted as BC; -1 being 1 BC, and so on." | |||
| 2927 | (let ((gap (calendar-interval | 2927 | (let ((gap (calendar-interval |
| 2928 | displayed-month displayed-year | 2928 | displayed-month displayed-year |
| 2929 | (extract-calendar-month date) (extract-calendar-year date)))) | 2929 | (extract-calendar-month date) (extract-calendar-year date)))) |
| 2930 | (and (calendar-date-is-legal-p date) (> 2 gap) (< -2 gap)))) | 2930 | (and (calendar-date-is-valid-p date) (> 2 gap) (< -2 gap)))) |
| 2931 | 2931 | ||
| 2932 | (defun calendar-date-is-legal-p (date) | 2932 | (defun calendar-date-is-valid-p (date) |
| 2933 | "Return t if DATE is a valid date." | 2933 | "Return t if DATE is a valid date." |
| 2934 | (let ((month (extract-calendar-month date)) | 2934 | (let ((month (extract-calendar-month date)) |
| 2935 | (day (extract-calendar-day date)) | 2935 | (day (extract-calendar-day date)) |
| @@ -2945,6 +2945,9 @@ interpreted as BC; -1 being 1 BC, and so on." | |||
| 2945 | ;; Note there are side effects on calendar navigation. | 2945 | ;; Note there are side effects on calendar navigation. |
| 2946 | (<= 1 year)))) | 2946 | (<= 1 year)))) |
| 2947 | 2947 | ||
| 2948 | (define-obsolete-function-alias 'calendar-date-is-legal-p | ||
| 2949 | 'calendar-date-is-valid-p "23.1") | ||
| 2950 | |||
| 2948 | (defun calendar-date-equal (date1 date2) | 2951 | (defun calendar-date-equal (date1 date2) |
| 2949 | "Return t if the DATE1 and DATE2 are the same." | 2952 | "Return t if the DATE1 and DATE2 are the same." |
| 2950 | (and | 2953 | (and |
| @@ -2956,7 +2959,7 @@ interpreted as BC; -1 being 1 BC, and so on." | |||
| 2956 | "Mark DATE in the calendar window with MARK. | 2959 | "Mark DATE in the calendar window with MARK. |
| 2957 | MARK is a single-character string, a list of face attributes/values, or a face. | 2960 | MARK is a single-character string, a list of face attributes/values, or a face. |
| 2958 | MARK defaults to `diary-entry-marker'." | 2961 | MARK defaults to `diary-entry-marker'." |
| 2959 | (if (calendar-date-is-legal-p date) | 2962 | (if (calendar-date-is-valid-p date) |
| 2960 | (with-current-buffer calendar-buffer | 2963 | (with-current-buffer calendar-buffer |
| 2961 | (save-excursion | 2964 | (save-excursion |
| 2962 | (calendar-cursor-to-visible-date date) | 2965 | (calendar-cursor-to-visible-date date) |