aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1994-02-07 20:56:46 +0000
committerRichard M. Stallman1994-02-07 20:56:46 +0000
commit6a6e6405ef8b674ac10e5d7d3043d4a27945ae51 (patch)
treea90b00bddc934fbe7f0ae3eb42c303bdba6dba3e
parentd33b3958453161f3d0586ad65a1d53873dfa9439 (diff)
downloademacs-6a6e6405ef8b674ac10e5d7d3043d4a27945ae51.tar.gz
emacs-6a6e6405ef8b674ac10e5d7d3043d4a27945ae51.zip
(calendar-sunrise-sunset): Use new error arg to calendar-cursor-to-date.
(sunrise-sunset): Allow it to be called without an argument (as advertized).
-rw-r--r--lisp/calendar/solar.el6
1 files 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 @@
1;;; solar.el --- calendar functions for solar events. 1;;; solar.el --- calendar functions for solar events.
2 2
3;; Copyright (C) 1992 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 1993 Free Software Foundation, Inc.
4 4
5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> 5;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
6;; Keywords: calendar 6;; Keywords: calendar
@@ -400,6 +400,7 @@ latitude, time zone, and date.
400 400
401This function is suitable for execution in a .emacs file." 401This function is suitable for execution in a .emacs file."
402 (interactive "p") 402 (interactive "p")
403 (or arg (setq arg 1))
403 (if (and (< arg 16) 404 (if (and (< arg 16)
404 (not (and calendar-latitude calendar-longitude calendar-time-zone))) 405 (not (and calendar-latitude calendar-longitude calendar-time-zone)))
405 (solar-setup)) 406 (solar-setup))
@@ -455,8 +456,7 @@ Accurate to +/- 2 minutes."
455 (interactive) 456 (interactive)
456 (if (not (and calendar-latitude calendar-longitude calendar-time-zone)) 457 (if (not (and calendar-latitude calendar-longitude calendar-time-zone))
457 (solar-setup)) 458 (solar-setup))
458 (let ((date (or (calendar-cursor-to-date) 459 (let ((date (calendar-cursor-to-date t)))
459 (error "Cursor is not on a date!"))))
460 (message "%s: %s" 460 (message "%s: %s"
461 (calendar-date-string date t t) 461 (calendar-date-string date t t)
462 (solar-sunrise-sunset date)))) 462 (solar-sunrise-sunset date))))