From bae5a5a39dd86e36af968355b38333239d8aedbe Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 13 Mar 2008 04:06:47 +0000 Subject: [PATCH] (cal-hebrew-yahrzeit-buffer): New constant. (calendar-buffer-list): Simplify. --- lisp/ChangeLog | 33 +++++++++++++++++++++++++++++++++ lisp/calendar/calendar.el | 22 +++++++++++----------- 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 97c66c08d26..707f5fda313 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -5,6 +5,39 @@ * startup.el (command-line-1): Rename -scriptload to -internal-script. + * calendar/calendar.el (cal-hebrew-yahrzeit-buffer): New constant. + (calendar-buffer-list): Simplify. + + * calendar/cal-hebrew.el (list-yahrzeit-dates): Use + cal-hebrew-yahrzeit-buffer. + + * calendar/cal-x.el (calendar-only-one-frame-setup) + (calendar-two-frame-setup): Doc fixes. + (special-display-buffer-names): Use cal-hebrew-yahrzeit-buffer. + + * calendar/appt.el (appt-mode-string): Mark as risky. + (appt-check): Apply mode-line-emphasis face to appt-mode-string. + + * calendar/cal-iso.el (calendar-absolute-from-iso) + (calendar-iso-read-args): Simplify. + (calendar-iso-date-string, calendar-iso-read-args) + (calendar-goto-iso-date, calendar-goto-iso-week): Doc fixes. + + * calendar/cal-julian.el (calendar-julian-from-absolute): Use zerop. + (displayed-month, displayed-year): Move declarations where needed. + (calendar-print-astro-day-number): Doc fix. + + * calendar/cal-persia.el (persian-calendar-month-name-array) + (persian-calendar-epoch, calendar-persian-date-string): Doc fixes. + (persian-prompt-for-date): Remove local variable `today'. + + * calendar/solar.el (solar-moment, solar-exact-local-noon) + (solar-sunrise-sunset, solar-sunrise-sunset-string) + (solar-ephemeris-time, solar-date-next-longitude, solar-sidereal-time): + (diary-sabbath-candles, solar-equinoxes/solstices) + (solar-equinoxes-solstices): Use cadr, cdar, nth, zerop. + (solar-time-equation, solar-date-to-et): Simplify. + * mail/supercite.el: Remove the `function' in `(function (lambda'. Replace `(car (cdr' with cadr'. diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 7daf95b88c0..733772c4acc 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el @@ -1165,6 +1165,9 @@ with descriptive strings such as (defconst lunar-phases-buffer "*Phases of Moon*" "Name of the buffer used for the lunar phases.") +(defconst cal-hebrew-yahrzeit-buffer "*Yahrzeits*" + "Name of the buffer used by `list-yahrzeit-dates'.") + (defmacro increment-calendar-month (mon yr n) "Increment the variables MON and YR by N months. Forward if N is positive or backward if N is negative. @@ -1958,17 +1961,14 @@ the STRINGS are just concatenated and the result truncated." (defun calendar-buffer-list () "List of all calendar-related buffers." - (let* ((diary-buffer (get-file-buffer diary-file)) - (buffers (list "*Yahrzeits*" lunar-phases-buffer holiday-buffer - fancy-diary-buffer diary-buffer calendar-buffer - other-calendars-buffer)) - (buffer-list nil)) - (dolist (b buffers) - (setq b (cond ((stringp b) (get-buffer b)) - ((bufferp b) b) - (t nil))) - (if b (push b buffer-list))) - buffer-list)) + (let (buffs) + (dolist (b (list cal-hebrew-yahrzeit-buffer lunar-phases-buffer + holiday-buffer fancy-diary-buffer + (get-file-buffer diary-file) + calendar-buffer other-calendars-buffer)) + (and b (get-buffer b) + (push b buffs))) + buffs)) (defun exit-calendar () "Get out of the calendar window and hide it and related buffers." -- 2.39.2