mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-02 11:21:42 +00:00
(diary-julian-date): Move to end.
(generated-autoload-file): Don't set, instead use different values of generate-autoload-cookie plus Makefile rules to allow for a mixture of internal calendar autoloads and normal autoloads.
This commit is contained in:
parent
9e85002dac
commit
c24be81ed9
@ -38,7 +38,7 @@
|
||||
|
||||
(require 'calendar)
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-julian-from-absolute (date)
|
||||
"Compute the Julian (month day year) corresponding to the absolute DATE.
|
||||
The absolute date is the number of days elapsed since the (imaginary)
|
||||
@ -79,7 +79,7 @@ The Gregorian date Sunday, December 31, 1 BC is imaginary."
|
||||
(/ (1- year) 4)
|
||||
-2)))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-julian-date-string (&optional date)
|
||||
"String of Julian date of Gregorian DATE.
|
||||
Defaults to today's date if DATE is not given.
|
||||
@ -90,14 +90,14 @@ Driven by the variable `calendar-date-display-form'."
|
||||
(or date (calendar-current-date))))
|
||||
nil t))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-print-julian-date ()
|
||||
"Show the Julian calendar equivalent of the date under the cursor."
|
||||
(interactive)
|
||||
(message "Julian date: %s"
|
||||
(calendar-julian-date-string (calendar-cursor-to-date t))))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-goto-julian-date (date &optional noecho)
|
||||
"Move cursor to Julian DATE; echo Julian date unless NOECHO is t."
|
||||
(interactive
|
||||
@ -136,6 +136,7 @@ Driven by the variable `calendar-date-display-form'."
|
||||
(defvar displayed-month)
|
||||
(defvar displayed-year)
|
||||
|
||||
;;;###holiday-autoload
|
||||
(defun holiday-julian (month day string)
|
||||
"Holiday on MONTH, DAY (Julian) called STRING.
|
||||
If MONTH, DAY (Julian) is visible, the value returned is corresponding
|
||||
@ -163,24 +164,17 @@ nil if it is not visible in the current calendar window."
|
||||
(if (calendar-date-is-visible-p date)
|
||||
(list (list date string)))))))
|
||||
|
||||
(defvar date)
|
||||
|
||||
;; To be called from list-sexp-diary-entries, where DATE is bound.
|
||||
(defun diary-julian-date ()
|
||||
"Julian calendar equivalent of date diary entry."
|
||||
(format "Julian date: %s" (calendar-julian-date-string date)))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-absolute-from-astro (d)
|
||||
"Absolute date of astronomical (Julian) day number D."
|
||||
(- d 1721424.5))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-astro-from-absolute (d)
|
||||
"Astronomical (Julian) day number of absolute date D."
|
||||
(+ d 1721424.5))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-astro-date-string (&optional date)
|
||||
"String of astronomical (Julian) day number after noon UTC of Gregorian DATE.
|
||||
Defaults to today's date if DATE is not given."
|
||||
@ -190,7 +184,7 @@ Defaults to today's date if DATE is not given."
|
||||
(calendar-absolute-from-gregorian
|
||||
(or date (calendar-current-date)))))))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-print-astro-day-number ()
|
||||
"Show astronomical (Julian) day number after noon UTC on cursor date."
|
||||
(interactive)
|
||||
@ -198,7 +192,7 @@ Defaults to today's date if DATE is not given."
|
||||
"Astronomical (Julian) day number (at noon UTC): %s.0"
|
||||
(calendar-astro-date-string (calendar-cursor-to-date t))))
|
||||
|
||||
;;;###autoload
|
||||
;;;###cal-autoload
|
||||
(defun calendar-goto-astro-day-number (daynumber &optional noecho)
|
||||
"Move cursor to astronomical (Julian) DAYNUMBER.
|
||||
Echo astronomical (Julian) day number unless NOECHO is t."
|
||||
@ -211,7 +205,17 @@ Echo astronomical (Julian) day number unless NOECHO is t."
|
||||
(calendar-absolute-from-astro daynumber))))
|
||||
(or noecho (calendar-print-astro-day-number)))
|
||||
|
||||
|
||||
(defvar date)
|
||||
|
||||
;; To be called from list-sexp-diary-entries, where DATE is bound.
|
||||
;;;###diary-autoload
|
||||
(defun diary-julian-date ()
|
||||
"Julian calendar equivalent of date diary entry."
|
||||
(format "Julian date: %s" (calendar-julian-date-string date)))
|
||||
|
||||
;; To be called from list-sexp-diary-entries, where DATE is bound.
|
||||
;;;###diary-autoload
|
||||
(defun diary-astro-day-number ()
|
||||
"Astronomical (Julian) day number diary entry."
|
||||
(format "Astronomical (Julian) day number at noon UTC: %s.0"
|
||||
@ -219,9 +223,5 @@ Echo astronomical (Julian) day number unless NOECHO is t."
|
||||
|
||||
(provide 'cal-julian)
|
||||
|
||||
;; Local Variables:
|
||||
;; generated-autoload-file: "cal-loaddefs.el"
|
||||
;; End:
|
||||
|
||||
;; arch-tag: 0520acdd-1c60-4188-9aa8-9b8c24d856ae
|
||||
;;; cal-julian.el ends here
|
||||
|
Loading…
Reference in New Issue
Block a user