Mercurial > emacs
comparison lisp/calendar/cal-menu.el @ 7403:066fec1fce40
(calendar-event-to-date): Set buffer in case calendar isn't current.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 08 May 1994 06:29:31 +0000 |
parents | 494ca99e9517 |
children | f067e1a5ceb4 |
comparison
equal
deleted
inserted
replaced
7402:494ca99e9517 | 7403:066fec1fce40 |
---|---|
175 (put 'insert-yearly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | 175 (put 'insert-yearly-diary-entry 'menu-enable '(calendar-cursor-to-date)) |
176 (put 'insert-monthly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | 176 (put 'insert-monthly-diary-entry 'menu-enable '(calendar-cursor-to-date)) |
177 (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-to-date)) | 177 (put 'insert-weekly-diary-entry 'menu-enable '(calendar-cursor-to-date)) |
178 | 178 |
179 (defun calendar-event-to-date () | 179 (defun calendar-event-to-date () |
180 "Date of last event. Nil if last event was not done on a date." | 180 "Date of last event. Value is nil if last event was not done on a date." |
181 (save-excursion | 181 (save-excursion |
182 (set-buffer (window-buffer (posn-window (event-start last-input-event)))) | |
182 (goto-char (posn-point (event-start last-input-event))) | 183 (goto-char (posn-point (event-start last-input-event))) |
183 (calendar-cursor-to-date))) | 184 (calendar-cursor-to-date))) |
184 | 185 |
185 (defun calendar-mouse-insert-hebrew-diary-entry (event) | 186 (defun calendar-mouse-insert-hebrew-diary-entry (event) |
186 "Pop up menu to insert a Hebrew-date diary entry." | 187 "Pop up menu to insert a Hebrew-date diary entry." |