aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-04-08 07:04:17 +0000
committerGlenn Morris2008-04-08 07:04:17 +0000
commit0e408f0cc5639f91deaaadb898449dddaf2f15a8 (patch)
tree720f61c61d710c9e011339537d9f0e18c8af58ac
parent36c0514ceaf4b3740a615c6c4f0a3280cbc1dd58 (diff)
downloademacs-0e408f0cc5639f91deaaadb898449dddaf2f15a8.tar.gz
emacs-0e408f0cc5639f91deaaadb898449dddaf2f15a8.zip
(cal-menu-event-to-date): Rename calendar-event-to-date. Update callers.
(calendar-mouse-tex-day): Rename cal-tex-mouse-day. (calendar-mouse-tex-week): Rename cal-tex-mouse-week. (calendar-mouse-tex-week2): Rename cal-tex-mouse-week2. (calendar-mouse-tex-week-iso): Rename cal-tex-mouse-week-iso. (calendar-mouse-tex-week-monday): Rename cal-tex-mouse-week-monday. (calendar-mouse-tex-filofax-daily): Rename cal-tex-mouse-filofax-daily. (calendar-mouse-tex-filofax-2week): Rename cal-tex-mouse-filofax-2week. (calendar-mouse-tex-filofax-week): Rename cal-tex-mouse-filofax-week. (calendar-mouse-tex-month): Rename cal-tex-mouse-month. (calendar-mouse-tex-month-landscape): Rename cal-tex-mouse-month-landscape. (calendar-mouse-tex-year): Rename cal-tex-mouse-year. (calendar-mouse-tex-filofax-year): Rename cal-tex-mouse-filofax-year. (calendar-mouse-tex-year-landscape): Rename cal-tex-mouse-year-landscape. (cal-menu-context-mouse-menu): Update for above name changes.
-rw-r--r--lisp/calendar/cal-menu.el100
1 files changed, 50 insertions, 50 deletions
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index 9ffbb8268c6..b1b680e59c2 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -172,7 +172,7 @@ POSITION and MENU are passed to `x-popup-menu'."
172 (interactive) 172 (interactive)
173 (holiday-list (1- (calendar-extract-year (calendar-cursor-to-date))))) 173 (holiday-list (1- (calendar-extract-year (calendar-cursor-to-date)))))
174 174
175(defun calendar-event-to-date (&optional error) 175(defun cal-menu-event-to-date (&optional error)
176 "Date of last event. 176 "Date of last event.
177If event is not on a specific date, signals an error if optional parameter 177If event is not on a specific date, signals an error if optional parameter
178ERROR is non-nil, otherwise just returns nil." 178ERROR is non-nil, otherwise just returns nil."
@@ -190,7 +190,7 @@ ERROR is non-nil, otherwise just returns nil."
190 "Show sunrise/sunset times for mouse-selected date." 190 "Show sunrise/sunset times for mouse-selected date."
191 (interactive) 191 (interactive)
192 (save-excursion 192 (save-excursion
193 (calendar-mouse-goto-date (calendar-event-to-date)) 193 (calendar-mouse-goto-date (cal-menu-event-to-date))
194 (calendar-sunrise-sunset))) 194 (calendar-sunrise-sunset)))
195 195
196(defun cal-menu-today-holidays () 196(defun cal-menu-today-holidays ()
@@ -206,7 +206,7 @@ ERROR is non-nil, otherwise just returns nil."
206 "Pop up menu of holidays for mouse selected date. 206 "Pop up menu of holidays for mouse selected date.
207EVENT is the event that invoked this command." 207EVENT is the event that invoked this command."
208 (interactive "e") 208 (interactive "e")
209 (let* ((date (calendar-event-to-date)) 209 (let* ((date (cal-menu-event-to-date))
210 (title (format "Holidays for %s" (calendar-date-string date))) 210 (title (format "Holidays for %s" (calendar-date-string date)))
211 (selection 211 (selection
212 (cal-menu-x-popup-menu 212 (cal-menu-x-popup-menu
@@ -226,7 +226,7 @@ Use optional DATE and alternative file DIARY. EVENT is the event
226that invoked this command. Shows holidays if `diary-show-holidays-flag' 226that invoked this command. Shows holidays if `diary-show-holidays-flag'
227is non-nil." 227is non-nil."
228 (interactive "i\ni\ne") 228 (interactive "i\ni\ne")
229 (let* ((date (or date (calendar-event-to-date))) 229 (let* ((date (or date (cal-menu-event-to-date)))
230 (diary-file (or diary diary-file)) 230 (diary-file (or diary diary-file))
231 (diary-list-include-blanks nil) 231 (diary-list-include-blanks nil)
232 (diary-display-hook 'ignore) 232 (diary-display-hook 'ignore)
@@ -257,124 +257,124 @@ is non-nil."
257 "Pop up menu of diary entries from alternative file on mouse-selected date." 257 "Pop up menu of diary entries from alternative file on mouse-selected date."
258 (interactive) 258 (interactive)
259 (calendar-mouse-view-diary-entries 259 (calendar-mouse-view-diary-entries
260 (calendar-event-to-date) 260 (cal-menu-event-to-date)
261 (read-file-name "Enter diary file name: " default-directory nil t))) 261 (read-file-name "Enter diary file name: " default-directory nil t)))
262 262
263(defun calendar-mouse-insert-diary-entry () 263(defun calendar-mouse-insert-diary-entry ()
264 "Insert diary entry for mouse-selected date." 264 "Insert diary entry for mouse-selected date."
265 (interactive) 265 (interactive)
266 (save-excursion 266 (save-excursion
267 (calendar-mouse-goto-date (calendar-event-to-date)) 267 (calendar-mouse-goto-date (cal-menu-event-to-date))
268 (diary-insert-entry nil))) 268 (diary-insert-entry nil)))
269 269
270(defun calendar-mouse-set-mark () 270(defun calendar-mouse-set-mark ()
271 "Mark the date under the cursor." 271 "Mark the date under the cursor."
272 (interactive) 272 (interactive)
273 (save-excursion 273 (save-excursion
274 (calendar-mouse-goto-date (calendar-event-to-date)) 274 (calendar-mouse-goto-date (cal-menu-event-to-date))
275 (calendar-set-mark nil))) 275 (calendar-set-mark nil)))
276 276
277(defun cal-tex-mouse-day () 277(defun calendar-mouse-tex-day ()
278 "Make a buffer with LaTeX commands for the day mouse is on." 278 "Make a buffer with LaTeX commands for the day mouse is on."
279 (interactive) 279 (interactive)
280 (save-excursion 280 (save-excursion
281 (calendar-mouse-goto-date (calendar-event-to-date)) 281 (calendar-mouse-goto-date (cal-menu-event-to-date))
282 (cal-tex-cursor-day nil))) 282 (cal-tex-cursor-day nil)))
283 283
284(defun cal-tex-mouse-week () 284(defun calendar-mouse-tex-week ()
285 "One page calendar for week indicated by cursor. 285 "One page calendar for week indicated by cursor.
286Holidays are included if `cal-tex-holidays' is non-nil." 286Holidays are included if `cal-tex-holidays' is non-nil."
287 (interactive) 287 (interactive)
288 (save-excursion 288 (save-excursion
289 (calendar-mouse-goto-date (calendar-event-to-date)) 289 (calendar-mouse-goto-date (cal-menu-event-to-date))
290 (cal-tex-cursor-week nil))) 290 (cal-tex-cursor-week nil)))
291 291
292(defun cal-tex-mouse-week2 () 292(defun calendar-mouse-tex-week2 ()
293 "Make a buffer with LaTeX commands for the week cursor is on. 293 "Make a buffer with LaTeX commands for the week cursor is on.
294The printed output will be on two pages." 294The printed output will be on two pages."
295 (interactive) 295 (interactive)
296 (save-excursion 296 (save-excursion
297 (calendar-mouse-goto-date (calendar-event-to-date)) 297 (calendar-mouse-goto-date (cal-menu-event-to-date))
298 (cal-tex-cursor-week2 nil))) 298 (cal-tex-cursor-week2 nil)))
299 299
300(defun cal-tex-mouse-week-iso () 300(defun calendar-mouse-tex-week-iso ()
301 "One page calendar for week indicated by cursor. 301 "One page calendar for week indicated by cursor.
302Holidays are included if `cal-tex-holidays' is non-nil." 302Holidays are included if `cal-tex-holidays' is non-nil."
303 (interactive) 303 (interactive)
304 (save-excursion 304 (save-excursion
305 (calendar-mouse-goto-date (calendar-event-to-date)) 305 (calendar-mouse-goto-date (cal-menu-event-to-date))
306 (cal-tex-cursor-week-iso nil))) 306 (cal-tex-cursor-week-iso nil)))
307 307
308(defun cal-tex-mouse-week-monday () 308(defun calendar-mouse-tex-week-monday ()
309 "One page calendar for week indicated by cursor." 309 "One page calendar for week indicated by cursor."
310 (interactive) 310 (interactive)
311 (save-excursion 311 (save-excursion
312 (calendar-mouse-goto-date (calendar-event-to-date)) 312 (calendar-mouse-goto-date (cal-menu-event-to-date))
313 (cal-tex-cursor-week-monday nil))) 313 (cal-tex-cursor-week-monday nil)))
314 314
315(defun cal-tex-mouse-filofax-daily () 315(defun calendar-mouse-tex-filofax-daily ()
316 "Day-per-page Filofax calendar for week indicated by cursor." 316 "Day-per-page Filofax calendar for week indicated by cursor."
317 (interactive) 317 (interactive)
318 (save-excursion 318 (save-excursion
319 (calendar-mouse-goto-date (calendar-event-to-date)) 319 (calendar-mouse-goto-date (cal-menu-event-to-date))
320 (cal-tex-cursor-filofax-daily nil))) 320 (cal-tex-cursor-filofax-daily nil)))
321 321
322(defun cal-tex-mouse-filofax-2week () 322(defun calendar-mouse-tex-filofax-2week ()
323 "One page Filofax calendar for week indicated by cursor." 323 "One page Filofax calendar for week indicated by cursor."
324 (interactive) 324 (interactive)
325 (save-excursion 325 (save-excursion
326 (calendar-mouse-goto-date (calendar-event-to-date)) 326 (calendar-mouse-goto-date (cal-menu-event-to-date))
327 (cal-tex-cursor-filofax-2week nil))) 327 (cal-tex-cursor-filofax-2week nil)))
328 328
329(defun cal-tex-mouse-filofax-week () 329(defun calendar-mouse-tex-filofax-week ()
330 "Two page Filofax calendar for week indicated by cursor." 330 "Two page Filofax calendar for week indicated by cursor."
331 (interactive) 331 (interactive)
332 (save-excursion 332 (save-excursion
333 (calendar-mouse-goto-date (calendar-event-to-date)) 333 (calendar-mouse-goto-date (cal-menu-event-to-date))
334 (cal-tex-cursor-filofax-week nil))) 334 (cal-tex-cursor-filofax-week nil)))
335 335
336(defun cal-tex-mouse-month () 336(defun calendar-mouse-tex-month ()
337 "Make a buffer with LaTeX commands for the month cursor is on. 337 "Make a buffer with LaTeX commands for the month cursor is on.
338Calendar is condensed onto one page." 338Calendar is condensed onto one page."
339 (interactive) 339 (interactive)
340 (save-excursion 340 (save-excursion
341 (calendar-mouse-goto-date (calendar-event-to-date)) 341 (calendar-mouse-goto-date (cal-menu-event-to-date))
342 (cal-tex-cursor-month nil))) 342 (cal-tex-cursor-month nil)))
343 343
344(defun cal-tex-mouse-month-landscape () 344(defun calendar-mouse-tex-month-landscape ()
345 "Make a buffer with LaTeX commands for the month cursor is on. 345 "Make a buffer with LaTeX commands for the month cursor is on.
346The output is in landscape format, one month to a page." 346The output is in landscape format, one month to a page."
347 (interactive) 347 (interactive)
348 (save-excursion 348 (save-excursion
349 (calendar-mouse-goto-date (calendar-event-to-date)) 349 (calendar-mouse-goto-date (cal-menu-event-to-date))
350 (cal-tex-cursor-month-landscape nil))) 350 (cal-tex-cursor-month-landscape nil)))
351 351
352(defun cal-tex-mouse-year () 352(defun calendar-mouse-tex-year ()
353 "Make a buffer with LaTeX commands for the year cursor is on." 353 "Make a buffer with LaTeX commands for the year cursor is on."
354 (interactive) 354 (interactive)
355 (save-excursion 355 (save-excursion
356 (calendar-mouse-goto-date (calendar-event-to-date)) 356 (calendar-mouse-goto-date (cal-menu-event-to-date))
357 (cal-tex-cursor-year nil))) 357 (cal-tex-cursor-year nil)))
358 358
359(defun cal-tex-mouse-filofax-year () 359(defun calendar-mouse-tex-filofax-year ()
360 "Make a buffer with LaTeX commands for Filofax calendar of year cursor is on." 360 "Make a buffer with LaTeX commands for Filofax calendar of year cursor is on."
361 (interactive) 361 (interactive)
362 (save-excursion 362 (save-excursion
363 (calendar-mouse-goto-date (calendar-event-to-date)) 363 (calendar-mouse-goto-date (cal-menu-event-to-date))
364 (cal-tex-cursor-filofax-year nil))) 364 (cal-tex-cursor-filofax-year nil)))
365 365
366(defun cal-tex-mouse-year-landscape () 366(defun calendar-mouse-tex-year-landscape ()
367 "Make a buffer with LaTeX commands for the year cursor is on." 367 "Make a buffer with LaTeX commands for the year cursor is on."
368 (interactive) 368 (interactive)
369 (save-excursion 369 (save-excursion
370 (calendar-mouse-goto-date (calendar-event-to-date)) 370 (calendar-mouse-goto-date (cal-menu-event-to-date))
371 (cal-tex-cursor-year-landscape nil))) 371 (cal-tex-cursor-year-landscape nil)))
372 372
373(defun calendar-mouse-print-dates (&optional event) 373(defun calendar-mouse-print-dates (&optional event)
374 "Pop up menu of equivalent dates to mouse selected date. 374 "Pop up menu of equivalent dates to mouse selected date.
375EVENT is the event that invoked this command." 375EVENT is the event that invoked this command."
376 (interactive "e") 376 (interactive "e")
377 (let* ((date (calendar-event-to-date)) 377 (let* ((date (cal-menu-event-to-date))
378 (title (format "%s (Gregorian)" (calendar-date-string date))) 378 (title (format "%s (Gregorian)" (calendar-date-string date)))
379 (selection 379 (selection
380 (cal-menu-x-popup-menu 380 (cal-menu-x-popup-menu
@@ -387,31 +387,31 @@ EVENT is the event that invoked this command."
387(defun cal-menu-set-date-title (menu) 387(defun cal-menu-set-date-title (menu)
388 "Convert date of last event to title suitable for MENU." 388 "Convert date of last event to title suitable for MENU."
389 (easy-menu-filter-return 389 (easy-menu-filter-return
390 menu (calendar-date-string (calendar-event-to-date t) t nil))) 390 menu (calendar-date-string (cal-menu-event-to-date t) t nil)))
391 391
392(easy-menu-define cal-menu-context-mouse-menu nil 392(easy-menu-define cal-menu-context-mouse-menu nil
393 "Pop up menu for Mouse-2 for selected date in the calendar window." 393 "Pop up menu for Mouse-2 for selected date in the calendar window."
394 '("foo" :filter cal-menu-set-date-title 394 '("cal-menu-mouse2" :filter cal-menu-set-date-title
395 "--" 395 "--"
396 ["Holidays" calendar-mouse-holidays] 396 ["Holidays" calendar-mouse-holidays]
397 ["Mark date" calendar-mouse-set-mark] 397 ["Mark date" calendar-mouse-set-mark]
398 ["Sunrise/sunset" calendar-mouse-sunrise/sunset] 398 ["Sunrise/sunset" calendar-mouse-sunrise/sunset]
399 ["Other calendars" calendar-mouse-print-dates] 399 ["Other calendars" calendar-mouse-print-dates]
400 ("Prepare LaTeX buffer" 400 ("Prepare LaTeX buffer"
401 ["Daily (1 page)" cal-tex-mouse-day] 401 ["Daily (1 page)" calendar-mouse-tex-day]
402 ["Weekly (1 page)" cal-tex-mouse-week] 402 ["Weekly (1 page)" calendar-mouse-tex-week]
403 ["Weekly (2 pages)" cal-tex-mouse-week2] 403 ["Weekly (2 pages)" calendar-mouse-tex-week2]
404 ["Weekly (other style; 1 page)" cal-tex-mouse-week-iso] 404 ["Weekly (other style; 1 page)" calendar-mouse-tex-week-iso]
405 ["Weekly (yet another style; 1 page)" cal-tex-mouse-week-monday] 405 ["Weekly (yet another style; 1 page)" calendar-mouse-tex-week-monday]
406 ["Monthly" cal-tex-mouse-month] 406 ["Monthly" calendar-mouse-tex-month]
407 ["Monthly (landscape)" cal-tex-mouse-month-landscape] 407 ["Monthly (landscape)" calendar-mouse-tex-month-landscape]
408 ["Yearly" cal-tex-mouse-year] 408 ["Yearly" calendar-mouse-tex-year]
409 ["Yearly (landscape)" cal-tex-mouse-year-landscape] 409 ["Yearly (landscape)" calendar-mouse-tex-year-landscape]
410 ("Filofax styles" 410 ("Filofax styles"
411 ["Filofax Daily (one-day-per-page)" cal-tex-mouse-filofax-daily] 411 ["Filofax Daily (one-day-per-page)" calendar-mouse-tex-filofax-daily]
412 ["Filofax Weekly (2-weeks-at-a-glance)" cal-tex-mouse-filofax-2week] 412 ["Filofax Weekly (2-weeks-at-a-glance)" calendar-mouse-tex-filofax-2week]
413 ["Filofax Weekly (week-at-a-glance)" cal-tex-mouse-filofax-week] 413 ["Filofax Weekly (week-at-a-glance)" calendar-mouse-tex-filofax-week]
414 ["Filofax Yearly" cal-tex-mouse-filofax-year])) 414 ["Filofax Yearly" calendar-mouse-tex-filofax-year]))
415 ["Diary entries" calendar-mouse-view-diary-entries] 415 ["Diary entries" calendar-mouse-view-diary-entries]
416 ["Insert diary entry" calendar-mouse-insert-diary-entry] 416 ["Insert diary entry" calendar-mouse-insert-diary-entry]
417 ["Other diary file entries" calendar-mouse-view-other-diary-entries])) 417 ["Other diary file entries" calendar-mouse-view-other-diary-entries]))
@@ -427,7 +427,7 @@ EVENT is the event that invoked this command."
427 ["Unmark" calendar-unmark] 427 ["Unmark" calendar-unmark]
428 ["Lunar phases" calendar-phases-of-moon] 428 ["Lunar phases" calendar-phases-of-moon]
429 ["Show diary" diary-show-all-entries] 429 ["Show diary" diary-show-all-entries]
430 ["Exit calendar" exit-calendar])) 430 ["Exit calendar" calendar-exit]))
431 431
432;; Undocumented and probably useless. 432;; Undocumented and probably useless.
433(defvar cal-menu-load-hook nil 433(defvar cal-menu-load-hook nil