comparison lisp/calendar/cal-move.el @ 90133:4da4a09e8b1b

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-31 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 206-222) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 45-52) - Update from CVS - Update from CVS: texi Makefile.in CVS keyw cruft - Update from CVS: ChangeLog tweaks
author Miles Bader <miles@gnu.org>
date Thu, 31 Mar 2005 09:58:14 +0000
parents 68c22ea6027c 669da3d2cff9
children f9a65d7ebd29
comparison
equal deleted inserted replaced
90132:4080fe8b4f0f 90133:4da4a09e8b1b
1 ;;; cal-move.el --- calendar functions for movement in the calendar 1 ;;; cal-move.el --- calendar functions for movement in the calendar
2 2
3 ;; Copyright (C) 1995 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995, 2005 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 ;; Maintainer: Glenn Morris <gmorris@ast.cam.ac.uk>
6 ;; Keywords: calendar 7 ;; Keywords: calendar
7 ;; Human-Keywords: calendar 8 ;; Human-Keywords: calendar
8 9
9 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
10 11
267 (if (and (= day 1) (= 1 month)) 268 (if (and (= day 1) (= 1 month))
268 (calendar-backward-month (* 12 arg)) 269 (calendar-backward-month (* 12 arg))
269 (if (and (= arg 1) 270 (if (and (= arg 1)
270 (calendar-date-is-visible-p jan-first)) 271 (calendar-date-is-visible-p jan-first))
271 (calendar-cursor-to-visible-date jan-first) 272 (calendar-cursor-to-visible-date jan-first)
272 (calendar-other-month 1 (- year (1- arg)))))) 273 (calendar-other-month 1 (- year (1- arg)))
274 (calendar-cursor-to-visible-date (list 1 1 displayed-year)))))
273 (run-hooks 'calendar-move-hook)) 275 (run-hooks 'calendar-move-hook))
274 276
275 (defun calendar-end-of-year (arg) 277 (defun calendar-end-of-year (arg)
276 "Move the cursor forward ARG year beginnings." 278 "Move the cursor forward ARG year beginnings."
277 (interactive "p") 279 (interactive "p")
285 (if (and (= day 31) (= 12 month)) 287 (if (and (= day 31) (= 12 month))
286 (calendar-forward-month (* 12 arg)) 288 (calendar-forward-month (* 12 arg))
287 (if (and (= arg 1) 289 (if (and (= arg 1)
288 (calendar-date-is-visible-p dec-31)) 290 (calendar-date-is-visible-p dec-31))
289 (calendar-cursor-to-visible-date dec-31) 291 (calendar-cursor-to-visible-date dec-31)
290 (calendar-other-month 12 (- year (1- arg))) 292 (calendar-other-month 12 (+ year (1- arg)))
291 (calendar-cursor-to-visible-date (list 12 31 displayed-year))))) 293 (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
292 (run-hooks 'calendar-move-hook)) 294 (run-hooks 'calendar-move-hook))
293 295
294 (defun calendar-cursor-to-visible-date (date) 296 (defun calendar-cursor-to-visible-date (date)
295 "Move the cursor to DATE that is on the screen." 297 "Move the cursor to DATE that is on the screen."