Commit ed1cd40c authored by Stefan Monnier's avatar Stefan Monnier
Browse files

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.
parent 0ffde81e
......@@ -44,7 +44,6 @@
(defvar event)
(eval-when-compile (require 'calendar))
(require 'easymenu)
(define-key calendar-mode-map [menu-bar edit] 'undefined)
(define-key calendar-mode-map [menu-bar search] 'undefined)
......@@ -323,12 +322,14 @@ ERROR is t, otherwise just returns nil."
(calendar-cursor-to-date (calendar-current-date))
(autoload 'check-calendar-holidays "holidays")
(autoload 'diary-list-entries "diary-lib")
(defun calendar-mouse-holidays ()
"Pop up menu of holidays for mouse selected date."
(let* ((date (calendar-event-to-date))
(l (mapcar '(lambda (x) (list x))
(check-calendar-holidays date)))
(l (mapcar 'list (check-calendar-holidays date)))
......@@ -350,11 +351,10 @@ Any holidays are shown if `holidays-in-diary-buffer' is t."
(diary-list-include-blanks nil)
(diary-display-hook 'ignore)
(mapcar '(lambda (x) (split-string (car (cdr x)) "\^M\\|\n"))
(list-diary-entries date 1)))
(mapcar (lambda (x) (split-string (car (cdr x)) "\^M\\|\n"))
(diary-list-entries date 1)))
(holidays (if holidays-in-diary-buffer
(mapcar '(lambda (x) (list x))
(check-calendar-holidays date))))
(check-calendar-holidays date)))
(title (concat "Diary entries "
(if diary (format "from %s " diary) "")
"for "
......@@ -365,9 +365,7 @@ Any holidays are shown if `holidays-in-diary-buffer' is t."
(list title
(list title)
(if holidays
(mapcar '(lambda (x) (list (concat " " (car x))))
(mapcar (lambda (x) (list (concat " " x))) holidays)
(if holidays
(list "--shadow-etched-in" "--shadow-etched-in"))
(if diary-entries
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment