/[emacs]/emacs/lisp/calendar/cal-menu.el
ViewVC logotype

Diff of /emacs/lisp/calendar/cal-menu.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.59 by lektu, Fri Aug 26 11:21:57 2005 UTC revision 1.60 by monnier, Wed Sep 14 16:01:57 2005 UTC
# Line 44  Line 44 
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)
# Line 323  ERROR is t, otherwise just returns nil." Line 322  ERROR is t, otherwise just returns nil."
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
# Line 350  Any holidays are shown if `holidays-in-d Line 351  Any holidays are shown if `holidays-in-d
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 "
# Line 365  Any holidays are shown if `holidays-in-d Line 365  Any holidays are shown if `holidays-in-d
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

Legend:
Removed from v.1.59  
changed lines
  Added in v.1.60

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26