emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/calendar/cal-move.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/calendar/cal-move.el,v
Date: Tue, 01 Apr 2008 02:43:06 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/04/01 02:43:06

Index: cal-move.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/calendar/cal-move.el,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- cal-move.el 28 Mar 2008 02:45:58 -0000      1.26
+++ cal-move.el 1 Apr 2008 02:43:05 -0000       1.27
@@ -27,8 +27,7 @@
 
 ;;; Commentary:
 
-;; This collection of functions implements movement in the calendar for
-;; calendar.el.
+;; See calendar.el.
 
 ;;; Code:
 
@@ -102,16 +101,16 @@
   (let* ((cursor-date (calendar-cursor-to-date t))
          (month (extract-calendar-month cursor-date))
          (day (extract-calendar-day cursor-date))
-         (year (extract-calendar-year cursor-date)))
+         (year (extract-calendar-year cursor-date))
+         (last (progn
     (increment-calendar-month month year arg)
-    (let ((last (calendar-last-day-of-month month year)))
-      (if (< last day)
-          (setq day last)))
+                 (calendar-last-day-of-month month year)))
+         (day (min last day))
     ;; Put the new month on the screen, if needed, and go to the new date.
-    (let ((new-cursor-date (list month day year)))
+         (new-cursor-date (list month day year)))
       (if (not (calendar-date-is-visible-p new-cursor-date))
           (calendar-other-month month year))
-      (calendar-cursor-to-visible-date new-cursor-date)))
+    (calendar-cursor-to-visible-date new-cursor-date))
   (run-hooks 'calendar-move-hook))
 
 ;;;###cal-autoload
@@ -288,18 +287,19 @@
          (month (extract-calendar-month date))
          (day (extract-calendar-day date))
          (year (extract-calendar-year date))
-         (last-day (calendar-last-day-of-month month year)))
+         (last-day (calendar-last-day-of-month month year))
+         (last-day (progn
     (unless (= day last-day)
-      (calendar-cursor-to-visible-date (list month last-day year))
+                       (calendar-cursor-to-visible-date
+                        (list month last-day year))
       (setq arg (1- arg)))
     (increment-calendar-month month year arg)
-    (let ((last-day (list
-                     month
+                     (list month
                      (calendar-last-day-of-month month year)
-                     year)))
+                           year))))
       (if (not (calendar-date-is-visible-p last-day))
           (calendar-other-month month year)
-        (calendar-cursor-to-visible-date last-day))))
+      (calendar-cursor-to-visible-date last-day)))
   (run-hooks 'calendar-move-hook))
 
 ;;;###cal-autoload




reply via email to

[Prev in Thread] Current Thread [Next in Thread]