]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/cal-move.el
(calendar-mode-map): Refer to diary-show-all-entries rather than alias
[gnu-emacs] / lisp / calendar / cal-move.el
index fed55d9e9471715b51959c0f5ee0e0eee6a9c662..f7c8b284f1bb4b9789dc627a0f91b5ddbd4a5455 100644 (file)
@@ -1,8 +1,10 @@
 ;;; cal-move.el --- calendar functions for movement in the calendar
 
-;; Copyright (C) 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 2001, 2002, 2003, 2004, 2005, 2006
+;;   Free Software Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
+;; Maintainer: Glenn Morris <rgm@gnu.org>
 ;; Keywords: calendar
 ;; Human-Keywords: calendar
 
@@ -20,8 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -269,7 +271,8 @@ Moves forward if ARG is negative."
       (if (and (= arg 1)
                (calendar-date-is-visible-p jan-first))
           (calendar-cursor-to-visible-date jan-first)
-        (calendar-other-month 1 (- year (1- arg))))))
+        (calendar-other-month 1 (- year (1- arg)))
+        (calendar-cursor-to-visible-date (list 1 1 displayed-year)))))
   (run-hooks 'calendar-move-hook))
 
 (defun calendar-end-of-year (arg)
@@ -287,7 +290,7 @@ Moves forward if ARG is negative."
       (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-other-month 12 (+ year (1- arg)))
         (calendar-cursor-to-visible-date (list 12 31 displayed-year)))))
   (run-hooks 'calendar-move-hook))
 
@@ -350,4 +353,5 @@ Negative DAY counts backward from end of year."
 
 (provide 'cal-move)
 
+;;; arch-tag: d0883c46-7e16-4914-8ff8-8f67e699b781
 ;;; cal-move.el ends here