Mercurial > emacs
changeset 92530:04183df0b71f
(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.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 06 Mar 2008 15:01:24 +0000 |
parents | 7b55b0a875cc |
children | af82aa0e6b32 |
files | lisp/calendar/calendar.el |
diffstat | 1 files changed, 10 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/calendar/calendar.el Thu Mar 06 15:00:14 2008 +0000 +++ b/lisp/calendar/calendar.el Thu Mar 06 15:01:24 2008 +0000 @@ -1676,7 +1676,7 @@ (month (extract-calendar-month date)) (year (extract-calendar-year date))) ;; (calendar-read-date t) returns a date with day = nil, which is - ;; not a legal date for the visible test in the diary section. + ;; not a valid date for the visible test in the diary section. (if arg (setcar (cdr date) 1)) (increment-calendar-month month year (- calendar-offset)) ;; Display the buffer before calling generate-calendar-window so that it @@ -2092,7 +2092,7 @@ font-lock-mode) (font-lock-fontify-buffer)) (and mark-holidays-in-calendar -;;; (calendar-date-is-legal-p today) ; useful for BC dates +;;; (calendar-date-is-valid-p today) ; useful for BC dates (mark-calendar-holidays) (and in-calendar-window (sit-for 0))) (unwind-protect @@ -2352,7 +2352,7 @@ (easy-menu-define nil map nil cal-menu-holidays-menu) (easy-menu-define nil map nil cal-menu-goto-menu) (easy-menu-define nil map nil cal-menu-scroll-menu) - + (define-key map [down-mouse-3] (easy-menu-binding cal-menu-context-mouse-menu)) (define-key map [down-mouse-2] @@ -2927,9 +2927,9 @@ (let ((gap (calendar-interval displayed-month displayed-year (extract-calendar-month date) (extract-calendar-year date)))) - (and (calendar-date-is-legal-p date) (> 2 gap) (< -2 gap)))) - -(defun calendar-date-is-legal-p (date) + (and (calendar-date-is-valid-p date) (> 2 gap) (< -2 gap)))) + +(defun calendar-date-is-valid-p (date) "Return t if DATE is a valid date." (let ((month (extract-calendar-month date)) (day (extract-calendar-day date)) @@ -2945,6 +2945,9 @@ ;; Note there are side effects on calendar navigation. (<= 1 year)))) +(define-obsolete-function-alias 'calendar-date-is-legal-p + 'calendar-date-is-valid-p "23.1") + (defun calendar-date-equal (date1 date2) "Return t if the DATE1 and DATE2 are the same." (and @@ -2956,7 +2959,7 @@ "Mark DATE in the calendar window with MARK. MARK is a single-character string, a list of face attributes/values, or a face. MARK defaults to `diary-entry-marker'." - (if (calendar-date-is-legal-p date) + (if (calendar-date-is-valid-p date) (with-current-buffer calendar-buffer (save-excursion (calendar-cursor-to-visible-date date)