44 |
(defvar event) |
(defvar event) |
45 |
|
|
46 |
(eval-when-compile (require 'calendar)) |
(eval-when-compile (require 'calendar)) |
|
(require 'easymenu) |
|
47 |
|
|
48 |
(define-key calendar-mode-map [menu-bar edit] 'undefined) |
(define-key calendar-mode-map [menu-bar edit] 'undefined) |
49 |
(define-key calendar-mode-map [menu-bar search] 'undefined) |
(define-key calendar-mode-map [menu-bar search] 'undefined) |
322 |
(calendar-cursor-to-date (calendar-current-date)) |
(calendar-cursor-to-date (calendar-current-date)) |
323 |
(calendar-cursor-holidays))) |
(calendar-cursor-holidays))) |
324 |
|
|
325 |
|
(autoload 'check-calendar-holidays "holidays") |
326 |
|
(autoload 'diary-list-entries "diary-lib") |
327 |
|
|
328 |
(defun calendar-mouse-holidays () |
(defun calendar-mouse-holidays () |
329 |
"Pop up menu of holidays for mouse selected date." |
"Pop up menu of holidays for mouse selected date." |
330 |
(interactive) |
(interactive) |
331 |
(let* ((date (calendar-event-to-date)) |
(let* ((date (calendar-event-to-date)) |
332 |
(l (mapcar '(lambda (x) (list x)) |
(l (mapcar 'list (check-calendar-holidays date))) |
|
(check-calendar-holidays date))) |
|
333 |
(selection |
(selection |
334 |
(cal-menu-x-popup-menu |
(cal-menu-x-popup-menu |
335 |
event |
event |
351 |
(diary-list-include-blanks nil) |
(diary-list-include-blanks nil) |
352 |
(diary-display-hook 'ignore) |
(diary-display-hook 'ignore) |
353 |
(diary-entries |
(diary-entries |
354 |
(mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n")) |
(mapcar (lambda (x) (split-string (car (cdr x)) "\^M\\|\n")) |
355 |
(list-diary-entries date 1))) |
(diary-list-entries date 1))) |
356 |
(holidays (if holidays-in-diary-buffer |
(holidays (if holidays-in-diary-buffer |
357 |
(mapcar '(lambda (x) (list x)) |
(check-calendar-holidays date))) |
|
(check-calendar-holidays date)))) |
|
358 |
(title (concat "Diary entries " |
(title (concat "Diary entries " |
359 |
(if diary (format "from %s " diary) "") |
(if diary (format "from %s " diary) "") |
360 |
"for " |
"for " |
365 |
(list title |
(list title |
366 |
(append |
(append |
367 |
(list title) |
(list title) |
368 |
(if holidays |
(mapcar (lambda (x) (list (concat " " x))) holidays) |
|
(mapcar '(lambda (x) (list (concat " " (car x)))) |
|
|
holidays)) |
|
369 |
(if holidays |
(if holidays |
370 |
(list "--shadow-etched-in" "--shadow-etched-in")) |
(list "--shadow-etched-in" "--shadow-etched-in")) |
371 |
(if diary-entries |
(if diary-entries |