changeset 5835:1c685c3bd5a9

(calendar-sunrise-sunset): Use new error arg to calendar-cursor-to-date. (sunrise-sunset): Allow it to be called without an argument (as advertized).
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Feb 1994 20:56:46 +0000
parents 5391898ea85c
children 6d7ceb4493e3
files lisp/calendar/solar.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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 <reingold@cs.uiuc.edu>
 ;; 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))))