summaryrefslogtreecommitdiff
path: root/lisp/calendar/cal-menu.el
diff options
context:
space:
mode:
authorEdward M. Reingold <reingold@emr.cs.iit.edu>1994-10-26 15:28:56 +0000
committerEdward M. Reingold <reingold@emr.cs.iit.edu>1994-10-26 15:28:56 +0000
commit2d9fab2cf1944a1b838e2c35bff4c4b8d3653e5e (patch)
treec0c878855f938096f2b85ffb290d1670e0c1294c /lisp/calendar/cal-menu.el
parentd35b3bb3cbc532436ec6439bdd154d1ae19a82ac (diff)
downloademacs-2d9fab2cf1944a1b838e2c35bff4c4b8d3653e5e.tar.gz
Put insertion of diary entry on daily menu.
Diffstat (limited to 'lisp/calendar/cal-menu.el')
-rw-r--r--lisp/calendar/cal-menu.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 67025412a8b..c687ced14c8 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -238,6 +238,13 @@ ERROR is t, otherwise just returns nil."
(calendar-goto-date (calendar-event-to-date))
(view-diary-entries 1)))
+(defun calendar-mouse-insert-diary-entry ()
+ "Insert diary entry for mouse-selected date."
+ (interactive)
+ (save-excursion
+ (calendar-goto-date (calendar-event-to-date))
+ (insert-diary-entry nil)))
+
(defun calendar-mouse-set-mark ()
"Mark the date under the cursor."
(interactive)
@@ -284,6 +291,7 @@ ERROR is t, otherwise just returns nil."
(list
(calendar-date-string date t t)
'("Diary entries" . calendar-mouse-view-diary-entries)
+ '("Insert diary entry" . calendar-mouse-insert-diary-entry)
'("Holidays" . calendar-mouse-holidays)
'("Mark date" . calendar-mouse-set-mark)
'("Sunrise/sunset" . calendar-mouse-sunrise/sunset)