From 6a6e6405ef8b674ac10e5d7d3043d4a27945ae51 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 7 Feb 1994 20:56:46 +0000 Subject: [PATCH] (calendar-sunrise-sunset): Use new error arg to calendar-cursor-to-date. (sunrise-sunset): Allow it to be called without an argument (as advertized). --- lisp/calendar/solar.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index d0e9558bf10..137b3748b28 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -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 @@ latitude, time zone, and date. 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 @@ Accurate to +/- 2 minutes." (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)))) -- 2.39.5