From ac14560041e252bd6b1205e8c8dc751394c90bea Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 11 Jun 2008 02:57:35 +0000 Subject: [PATCH] (diary-list-entries-2): Accept optional Gregorian date, and add it, not the local date, to diary-entries-list. (diary-list-entries-1): Pass Gregorian date to diary-list-entries-2. --- lisp/ChangeLog | 11 +++++++++++ lisp/calendar/diary-lib.el | 10 ++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 826675914dd..2d1c1a0e798 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,14 @@ +2008-06-11 Glenn Morris + + * progmodes/fortran.el (fortran-end-of-subprogram): Check for a match + before trying to move there. + (fortran-calculate-indent): When fortran-check-all-num-for-matching-do + is non-nil, indent most terminating statements like loop body. + + * calendar/diary-lib.el (diary-list-entries-2): Accept optional + Gregorian date, and add it, not the local date, to diary-entries-list. + (diary-list-entries-1): Pass Gregorian date to diary-list-entries-2. + 2008-06-11 Stefan Monnier * progmodes/compile.el (compilation-filter): Fix up last change. diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 9ece770f324..18473d5df57 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -616,7 +616,7 @@ FILENAME being the file containing the diary entry." (define-obsolete-function-alias 'add-to-diary-list 'diary-add-to-list "23.1") (defun diary-list-entries-2 (date mark globattr list-only - &optional months symbol) + &optional months symbol gdate) "Internal subroutine of `diary-list-entries'. Find diary entries applying to DATE, by searching from point-min for each element of `diary-date-forms'. MARK indicates an entry is non-marking. @@ -624,7 +624,9 @@ GLOBATTR is the list of global file attributes. If LIST-ONLY is non-nil, don't change the buffer, only return a list of entries. Optional array MONTHS replaces `calendar-month-name-array', and means months cannot be abbreviated. Optional string SYMBOL marks diary -entries of the desired type. Returns non-nil if any entries were found." +entries of the desired type. If DATE is not Gregorian, then the +Gregorian equivalent should be provided via GDATE. Returns non-nil if +any entries were found." (let* ((month (calendar-extract-month date)) (day (calendar-extract-day date)) (year (calendar-extract-year date)) @@ -678,7 +680,7 @@ entries of the desired type. Returns non-nil if any entries were found." (buffer-substring-no-properties entry-start (point)) globattr)) (diary-add-to-list - date (car temp) + (or gdate date) (car temp) (buffer-substring-no-properties (1+ date-start) (1- entry-start)) (copy-marker entry-start) (cadr temp)))))) entry-found)) @@ -697,7 +699,7 @@ of the appropriate type." (dotimes (idummy number) (diary-list-entries-2 (funcall absfunc (calendar-absolute-from-gregorian gdate)) - diary-nonmarking-symbol file-glob-attrs list-only months symbol) + diary-nonmarking-symbol file-glob-attrs list-only months symbol gdate) (setq gdate (calendar-gregorian-from-absolute (1+ (calendar-absolute-from-gregorian gdate)))))) -- 2.39.2