diff options
| author | Stefan Monnier | 2005-09-14 16:01:57 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-09-14 16:01:57 +0000 |
| commit | ed1cd40c238e2666979e1d3b36fc1cb5ab0e7de0 (patch) | |
| tree | 727cc43884e004df1192b0c9b21e24bd4de67f4a | |
| parent | 0ffde81e4b17ec3e1dd34612aab58ecd9f358b20 (diff) | |
| download | emacs-ed1cd40c238e2666979e1d3b36fc1cb5ab0e7de0.tar.gz emacs-ed1cd40c238e2666979e1d3b36fc1cb5ab0e7de0.zip | |
Don't require easymenu, since we don't use it.
(check-calendar-holidays, diary-list-entries): Autoload.
Otherwise `emacs -q' followed by "mouse-2 -> diary entries" burps.
(calendar-mouse-holidays, calendar-mouse-view-diary-entries): Simplify.
| -rw-r--r-- | lisp/calendar/cal-menu.el | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 0291c41c1c6..870e0fb2f7f 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el | |||
| @@ -44,7 +44,6 @@ | |||
| 44 | (defvar event) | 44 | (defvar event) |
| 45 | 45 | ||
| 46 | (eval-when-compile (require 'calendar)) | 46 | (eval-when-compile (require 'calendar)) |
| 47 | (require 'easymenu) | ||
| 48 | 47 | ||
| 49 | (define-key calendar-mode-map [menu-bar edit] 'undefined) | 48 | (define-key calendar-mode-map [menu-bar edit] 'undefined) |
| 50 | (define-key calendar-mode-map [menu-bar search] 'undefined) | 49 | (define-key calendar-mode-map [menu-bar search] 'undefined) |
| @@ -323,12 +322,14 @@ ERROR is t, otherwise just returns nil." | |||
| 323 | (calendar-cursor-to-date (calendar-current-date)) | 322 | (calendar-cursor-to-date (calendar-current-date)) |
| 324 | (calendar-cursor-holidays))) | 323 | (calendar-cursor-holidays))) |
| 325 | 324 | ||
| 325 | (autoload 'check-calendar-holidays "holidays") | ||
| 326 | (autoload 'diary-list-entries "diary-lib") | ||
| 327 | |||
| 326 | (defun calendar-mouse-holidays () | 328 | (defun calendar-mouse-holidays () |
| 327 | "Pop up menu of holidays for mouse selected date." | 329 | "Pop up menu of holidays for mouse selected date." |
| 328 | (interactive) | 330 | (interactive) |
| 329 | (let* ((date (calendar-event-to-date)) | 331 | (let* ((date (calendar-event-to-date)) |
| 330 | (l (mapcar '(lambda (x) (list x)) | 332 | (l (mapcar 'list (check-calendar-holidays date))) |
| 331 | (check-calendar-holidays date))) | ||
| 332 | (selection | 333 | (selection |
| 333 | (cal-menu-x-popup-menu | 334 | (cal-menu-x-popup-menu |
| 334 | event | 335 | event |
| @@ -350,11 +351,10 @@ Any holidays are shown if `holidays-in-diary-buffer' is t." | |||
| 350 | (diary-list-include-blanks nil) | 351 | (diary-list-include-blanks nil) |
| 351 | (diary-display-hook 'ignore) | 352 | (diary-display-hook 'ignore) |
| 352 | (diary-entries | 353 | (diary-entries |
| 353 | (mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n")) | 354 | (mapcar (lambda (x) (split-string (car (cdr x)) "\^M\\|\n")) |
| 354 | (list-diary-entries date 1))) | 355 | (diary-list-entries date 1))) |
| 355 | (holidays (if holidays-in-diary-buffer | 356 | (holidays (if holidays-in-diary-buffer |
| 356 | (mapcar '(lambda (x) (list x)) | 357 | (check-calendar-holidays date))) |
| 357 | (check-calendar-holidays date)))) | ||
| 358 | (title (concat "Diary entries " | 358 | (title (concat "Diary entries " |
| 359 | (if diary (format "from %s " diary) "") | 359 | (if diary (format "from %s " diary) "") |
| 360 | "for " | 360 | "for " |
| @@ -365,9 +365,7 @@ Any holidays are shown if `holidays-in-diary-buffer' is t." | |||
| 365 | (list title | 365 | (list title |
| 366 | (append | 366 | (append |
| 367 | (list title) | 367 | (list title) |
| 368 | (if holidays | 368 | (mapcar (lambda (x) (list (concat " " x))) holidays) |
| 369 | (mapcar '(lambda (x) (list (concat " " (car x)))) | ||
| 370 | holidays)) | ||
| 371 | (if holidays | 369 | (if holidays |
| 372 | (list "--shadow-etched-in" "--shadow-etched-in")) | 370 | (list "--shadow-etched-in" "--shadow-etched-in")) |
| 373 | (if diary-entries | 371 | (if diary-entries |