changeset 92823:8fb3c7b3e53a

(cal-hebrew-yahrzeit-buffer): New constant. (calendar-buffer-list): Simplify.
author Glenn Morris <rgm@gnu.org>
date Thu, 13 Mar 2008 04:05:13 +0000
parents 3e5b1792e433
children c4ff7347cefc
files lisp/calendar/calendar.el
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/calendar/calendar.el	Thu Mar 13 04:04:14 2008 +0000
+++ b/lisp/calendar/calendar.el	Thu Mar 13 04:05:13 2008 +0000
@@ -1165,6 +1165,9 @@
 (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 @@
 
 (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."