Commit ea5ccb55 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(calendar-print-french-date,diary-french-date):

Use new error arg to calendar-cursor-to-date.
parent 25ed02fd
;;; cal-french.el --- calendar functions for the French Revolutionary calendar. ;;; cal-french.el --- calendar functions for the French Revolutionary calendar.
;; Copyright (C) 1988, 1989, 1992 Free Software Foundation, Inc. ;; Copyright (C) 1988, 1989, 1992, 1994 Free Software Foundation, Inc.
;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
;; Keywords: calendar ;; Keywords: calendar
...@@ -151,9 +151,7 @@ Defaults to today's date if DATE is not given." ...@@ -151,9 +151,7 @@ Defaults to today's date if DATE is not given."
(defun calendar-print-french-date () (defun calendar-print-french-date ()
"Show the French Revolutionary calendar equivalent of the selected date." "Show the French Revolutionary calendar equivalent of the selected date."
(interactive) (interactive)
(let ((f (calendar-french-date-string (let ((f (calendar-french-date-string (calendar-cursor-to-date t))))
(or (calendar-cursor-to-date)
(error "Cursor is not on a date!")))))
(if (string-equal f "") (if (string-equal f "")
(message "Date is pre-French Revolution") (message "Date is pre-French Revolution")
(message f)))) (message f))))
...@@ -213,9 +211,7 @@ Echo French Revolutionary date unless NOECHO is t." ...@@ -213,9 +211,7 @@ Echo French Revolutionary date unless NOECHO is t."
(defun diary-french-date () (defun diary-french-date ()
"French calendar equivalent of date diary entry." "French calendar equivalent of date diary entry."
(let ((f (calendar-french-date-string (let ((f (calendar-french-date-string (calendar-cursor-to-date t))))
(or (calendar-cursor-to-date)
(error "Cursor is not on a date!")))))
(if (string-equal f "") (if (string-equal f "")
"Date is pre-French Revolution" "Date is pre-French Revolution"
f))) f)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment