# HG changeset patch # User Richard M. Stallman # Date 760654606 0 # Node ID 1c685c3bd5a97b821fa26a19ceb3933223e917b0 # Parent 5391898ea85ccedaaca8f0131f9479c5d4044863 (calendar-sunrise-sunset): Use new error arg to calendar-cursor-to-date. (sunrise-sunset): Allow it to be called without an argument (as advertized). diff -r 5391898ea85c -r 1c685c3bd5a9 lisp/calendar/solar.el --- a/lisp/calendar/solar.el Mon Feb 07 20:55:00 1994 +0000 +++ b/lisp/calendar/solar.el Mon Feb 07 20:56:46 1994 +0000 @@ -1,6 +1,6 @@ ;;; solar.el --- calendar functions for solar events. -;; Copyright (C) 1992 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1993 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Keywords: calendar @@ -400,6 +400,7 @@ This function is suitable for execution in a .emacs file." (interactive "p") + (or arg (setq arg 1)) (if (and (< arg 16) (not (and calendar-latitude calendar-longitude calendar-time-zone))) (solar-setup)) @@ -455,8 +456,7 @@ (interactive) (if (not (and calendar-latitude calendar-longitude calendar-time-zone)) (solar-setup)) - (let ((date (or (calendar-cursor-to-date) - (error "Cursor is not on a date!")))) + (let ((date (calendar-cursor-to-date t))) (message "%s: %s" (calendar-date-string date t t) (solar-sunrise-sunset date))))