diff options
author | Richard M. Stallman <[email protected]> | 1994-02-07 20:56:46 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1994-02-07 20:56:46 +0000 |
commit | 6a6e6405ef8b674ac10e5d7d3043d4a27945ae51 (patch) | |
tree | a90b00bddc934fbe7f0ae3eb42c303bdba6dba3e /lisp/calendar/solar.el | |
parent | d33b3958453161f3d0586ad65a1d53873dfa9439 (diff) |
(calendar-sunrise-sunset): Use new error arg to calendar-cursor-to-date.
(sunrise-sunset): Allow it to be called without an argument (as advertized).
Diffstat (limited to 'lisp/calendar/solar.el')
-rw-r--r-- | lisp/calendar/solar.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index d0e9558bf1..137b3748b2 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 <[email protected]> ;; 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)))) |