emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: calendar-[beginning/end]-of-year bugged


From: Glenn Morris
Subject: Re: calendar-[beginning/end]-of-year bugged
Date: Fri, 04 Mar 2005 17:59:25 +0000
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

"Chong Yidong" wrote:

> calendar-beginning-of-year and calendar-end-of-year are buggy. For example:
>
> 1. M-x calendar  (Suppose it is February 27 2005)
> 2. M->           (Moves cursor to December 31 2005)
> 3. M-<           (Moves cursor back to February 27 2005)
> Expected behavior: move cursor to January 1 2005.

This works as it should for me, in the current CVS started with -q
--no-site-file.

> 1. M-x calendar  (Suppose it is February 27 2005)
> 2. C-u 2 M->     (Moves cursor to December 2004)
> Expected behavior: move cursor to December 2006

OK, this one I can reproduce. Looks like a trivial +/- typo to me at
first glance:


*** cal-move.el 1 Sep 2003 15:45:19 -0000       1.9
--- cal-move.el 4 Mar 2005 17:58:15 -0000
***************
*** 287,293 ****
        (if (and (= arg 1)
                 (calendar-date-is-visible-p dec-31))
            (calendar-cursor-to-visible-date dec-31)
!         (calendar-other-month 12 (- year (1- arg)))
          (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
    (run-hooks 'calendar-move-hook))
  
--- 287,293 ----
        (if (and (= arg 1)
                 (calendar-date-is-visible-p dec-31))
            (calendar-cursor-to-visible-date dec-31)
!         (calendar-other-month 12 (+ year (1- arg)))
          (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
    (run-hooks 'calendar-move-hook))
  




reply via email to

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