]> git.eshelyaron.com Git - emacs.git/commitdiff
Minor fix to earlier changes today.
authorEdward M. Reingold <reingold@emr.cs.iit.edu>
Mon, 11 May 1998 17:18:04 +0000 (17:18 +0000)
committerEdward M. Reingold <reingold@emr.cs.iit.edu>
Mon, 11 May 1998 17:18:04 +0000 (17:18 +0000)
lisp/calendar/cal-menu.el

index e6c58109edaa9a12a95f0c03d31a091c68b58a8e..2dc354dd662d270f82a2d0a699d6e5c12f9515ce 100644 (file)
             (setq l (cons ["Mark Holidays" mark-calendar-holidays t]
                           (cons ["Unmark Calendar" calendar-unmark t] l)))
             (easy-menu-change nil "holidays" (nreverse l))
+            (define-key calendar-mode-map [menu-bar holidays today]
+                `(,(format "For Today (%s)"
+                           (calendar-date-string (calendar-current-date) t t))
+                  . cal-menu-today-holidays))
             (let ((title
                    (let ((m1 displayed-month)
                          (y1 displayed-year)
                                y1
                                (calendar-month-name m2 3)
                                y2)))))
-              (define-key  calendar-mode-map [menu-bar holidays 3-day]
+              (define-key  calendar-mode-map [menu-bar holidays 3-month]
                 `(,(format "For Current Window (%s)" title)
                   . list-calendar-holidays)))
             (let ((date (calendar-cursor-to-date)))
@@ -266,6 +270,13 @@ ERROR is t, otherwise just returns nil."
     (calendar-mouse-goto-date (calendar-event-to-date))
     (calendar-sunrise-sunset)))
 
+(defun cal-menu-today-holidays ()
+  "Show holidays for today's date."
+  (interactive)
+  (save-excursion
+    (calendar-cursor-to-date (calendar-current-date))
+    (calendar-cursor-holidays)))
+
 (defun calendar-mouse-holidays ()
   "Show holidays for mouse-selected date."
   (interactive)