diff options
Diffstat (limited to 'lisp/calendar/cal-menu.el')
-rw-r--r-- | lisp/calendar/cal-menu.el | 56 |
1 files changed, 53 insertions, 3 deletions
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el index 47fd4fc4c2a..0f54722a5ca 100644 --- a/lisp/calendar/cal-menu.el +++ b/lisp/calendar/cal-menu.el @@ -33,6 +33,53 @@ ;;; Code: +;; The code in this file is only called from calendar.el, but can't +;; require it (to supress undefined function warnings from compiler) +;; without a recursive require. +;; All these functions are either autoloaded, or autoloaded or defined +;; in calendar.el. +(declare-function calendar-increment-month "calendar" (n &optional mon yr)) +(declare-function calendar-month-name "calendar" (month &optional abbrev)) +(declare-function extract-calendar-year "calendar" (date)) +(declare-function calendar-cursor-to-date "calendar" (&optional error)) +(declare-function holiday-list "holidays" (y1 y2 &optional l label)) +(declare-function calendar-sunrise-sunset "solar" nil) +(declare-function calendar-current-date "calendar" nil) +(declare-function calendar-cursor-holidays "holidays" nil) +(declare-function calendar-date-string "calendar" + (date &optional abbreviate nodayname)) +(declare-function insert-diary-entry "diary-lib" (arg)) +(declare-function calendar-set-mark "calendar" (arg)) +(declare-function cal-tex-cursor-day "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-week "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-week2 "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-week-iso "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-week-monday "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-filofax-daily "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-filofax-2week "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-filofax-week "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-month "cal-tex" (arg)) +(declare-function cal-tex-cursor-month-landscape "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-year "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-filofax-year "cal-tex" (&optional arg)) +(declare-function cal-tex-cursor-year-landscape "cal-tex" (&optional arg)) +(declare-function calendar-day-of-year-string "calendar" (&optional date)) +(declare-function calendar-iso-date-string "cal-iso" (&optional date)) +(declare-function calendar-julian-date-string "cal-julian" (&optional date)) +(declare-function calendar-astro-date-string "cal-julian" (&optional date)) +(declare-function calendar-absolute-from-gregorian "calendar" (date)) +(declare-function calendar-hebrew-date-string "cal-hebrew" (&optional date)) +(declare-function calendar-persian-date-string "cal-persia" (&optional date)) +(declare-function calendar-bahai-date-string "cal-bahai" (&optional date)) +(declare-function calendar-islamic-date-string "cal-islam" (&optional date)) +(declare-function calendar-chinese-date-string "cal-china" (&optional date)) +(declare-function calendar-coptic-date-string "cal-coptic" (&optional date)) +(declare-function calendar-ethiopic-date-string "cal-coptic" (&optional date)) +(declare-function calendar-french-date-string "cal-french" (&optional date)) +(declare-function calendar-mayan-date-string "cal-mayan" (&optional date)) +(declare-function calendar-print-chinese-date "cal-china" nil) +(declare-function calendar-goto-date "cal-move" (date)) + (defvar displayed-year) (defconst cal-menu-moon-menu @@ -94,12 +141,15 @@ "--" ,@(let ((l ())) ;; Show 11 years--5 before, 5 after year of middle month. + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-11/msg01813.html (dotimes (i 11) - (push (vector "For Year" + (push (vector (format "hol-year-%d" i) `(lambda () (interactive) - (holiday-list (+ displayed-year ,(- i 5)))) - :suffix `(number-to-string (+ displayed-year ,(- i 5)))) + (holiday-list (+ displayed-year ,(- i 5)) + (+ displayed-year ,(- i 5)))) + :label `(format "For Year %d" + (+ displayed-year ,(- i 5)))) l)) (nreverse l)) "--" |