Mercurial > emacs
comparison lisp/calendar/cal-menu.el @ 52116:3132ffb5a7ab
(displayed-month, displayed-year): Define for compiler.
(cal-menu-update): Adapt for new behaviour of `calendar-month-name' function.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 03 Aug 2003 14:00:03 +0000 |
parents | 6fc90e779714 |
children | 75388c0f3104 |
comparison
equal
deleted
inserted
replaced
52115:60ffdeba6e0e | 52116:3132ffb5a7ab |
---|---|
1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support | 1 ;;; cal-menu.el --- calendar functions for menu bar and popup menu support |
2 | 2 |
3 ;; Copyright (C) 1994, 1995, 2001 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1994, 1995, 2001, 2003 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 5 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu> | 6 ;; Lara Rios <lrios@coewl.cen.uiuc.edu> |
7 ;; Keywords: calendar | 7 ;; Keywords: calendar |
8 ;; Human-Keywords: calendar, popup menus, menu bar | 8 ;; Human-Keywords: calendar, popup menus, menu bar |
34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign | 34 ;; (217) 333-6733 University of Illinois at Urbana-Champaign |
35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue | 35 ;; reingold@cs.uiuc.edu 1304 West Springfield Avenue |
36 ;; Urbana, Illinois 61801 | 36 ;; Urbana, Illinois 61801 |
37 | 37 |
38 ;;; Code: | 38 ;;; Code: |
39 | |
40 (defvar displayed-month) | |
41 (defvar displayed-year) | |
39 | 42 |
40 (eval-when-compile (require 'calendar)) | 43 (eval-when-compile (require 'calendar)) |
41 (require 'easymenu) | 44 (require 'easymenu) |
42 | 45 |
43 (define-key calendar-mode-map [menu-bar edit] 'undefined) | 46 (define-key calendar-mode-map [menu-bar edit] 'undefined) |
217 (y2 displayed-year)) | 220 (y2 displayed-year)) |
218 (increment-calendar-month m1 y1 -1) | 221 (increment-calendar-month m1 y1 -1) |
219 (increment-calendar-month m2 y2 1) | 222 (increment-calendar-month m2 y2 1) |
220 (if (= y1 y2) | 223 (if (= y1 y2) |
221 (format "%s-%s, %d" | 224 (format "%s-%s, %d" |
222 (calendar-month-name m1 3) | 225 (calendar-month-name m1 'abbrev) |
223 (calendar-month-name m2 3) | 226 (calendar-month-name m2 'abbrev) |
224 y2) | 227 y2) |
225 (format "%s, %d-%s, %d" | 228 (format "%s, %d-%s, %d" |
226 (calendar-month-name m1 3) | 229 (calendar-month-name m1 'abbrev) |
227 y1 | 230 y1 |
228 (calendar-month-name m2 3) | 231 (calendar-month-name m2 'abbrev) |
229 y2))))) | 232 y2))))) |
230 (define-key calendar-mode-map [menu-bar Holidays 3-month] | 233 (define-key calendar-mode-map [menu-bar Holidays 3-month] |
231 `(,(format "For Window (%s)" title) | 234 `(,(format "For Window (%s)" title) |
232 . list-calendar-holidays))) | 235 . list-calendar-holidays))) |
233 (let ((date (calendar-cursor-to-date))) | 236 (let ((date (calendar-cursor-to-date))) |