diff options
| author | Stefan Kangas | 2020-05-14 01:28:03 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2020-05-14 01:30:36 +0200 |
| commit | a4671733b7b990e83ef6daed4d17ab240a3591b5 (patch) | |
| tree | 5d5b26c9c111aa73b87fe99140bd971488d44f58 | |
| parent | f8a9edce7339273f9c56d27cc6999a22907638e7 (diff) | |
| download | emacs-a4671733b7b990e83ef6daed4d17ab240a3591b5.tar.gz emacs-a4671733b7b990e83ef6daed4d17ab240a3591b5.zip | |
; Fix warning after last change in cal-julian.el
* lisp/calendar/cal-julian.el (diary-julian-date)
(diary-astro-day-number): Silence byte-compiler warning about variable
'declared after its first use'.
| -rw-r--r-- | lisp/calendar/cal-julian.el | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index 0458c11920e..918995d0f9b 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el | |||
| @@ -182,23 +182,27 @@ Echo astronomical (Julian) day number unless NOECHO is non-nil." | |||
| 182 | (calendar-astro-to-absolute daynumber)))) | 182 | (calendar-astro-to-absolute daynumber)))) |
| 183 | (or noecho (calendar-astro-print-day-number))) | 183 | (or noecho (calendar-astro-print-day-number))) |
| 184 | 184 | ||
| 185 | |||
| 186 | ;; The function below is designed to be used in sexp diary entries, | ||
| 187 | ;; and may be present in users' diary files, so suppress the warning | ||
| 188 | ;; about this prefix-less dynamic variable. It's called from | ||
| 189 | ;; `diary-list-sexp-entries', which binds the variable. | ||
| 190 | (with-suppressed-warnings ((lexical date)) | ||
| 191 | (defvar date)) | ||
| 192 | |||
| 193 | ;;;###diary-autoload | 185 | ;;;###diary-autoload |
| 194 | (defun diary-julian-date () | 186 | (defun diary-julian-date () |
| 195 | "Julian calendar equivalent of date diary entry." | 187 | "Julian calendar equivalent of date diary entry." |
| 188 | ;; This function is designed to be used in sexp diary entries, and | ||
| 189 | ;; may be present in users' diary files, so suppress the warning | ||
| 190 | ;; about this prefix-less dynamic variable. It's called from | ||
| 191 | ;; `diary-list-sexp-entries', which binds the variable. | ||
| 192 | (with-suppressed-warnings ((lexical date)) | ||
| 193 | (defvar date)) | ||
| 196 | (format "Julian date: %s" (calendar-julian-date-string date))) | 194 | (format "Julian date: %s" (calendar-julian-date-string date))) |
| 197 | 195 | ||
| 198 | ;; To be called from diary-list-sexp-entries, where DATE is bound. | 196 | ;; To be called from diary-list-sexp-entries, where DATE is bound. |
| 199 | ;;;###diary-autoload | 197 | ;;;###diary-autoload |
| 200 | (defun diary-astro-day-number () | 198 | (defun diary-astro-day-number () |
| 201 | "Astronomical (Julian) day number diary entry." | 199 | "Astronomical (Julian) day number diary entry." |
| 200 | ;; This function is designed to be used in sexp diary entries, and | ||
| 201 | ;; may be present in users' diary files, so suppress the warning | ||
| 202 | ;; about this prefix-less dynamic variable. It's called from | ||
| 203 | ;; `diary-list-sexp-entries', which binds the variable. | ||
| 204 | (with-suppressed-warnings ((lexical date)) | ||
| 205 | (defvar date)) | ||
| 202 | (format "Astronomical (Julian) day number at noon UTC: %s.0" | 206 | (format "Astronomical (Julian) day number at noon UTC: %s.0" |
| 203 | (calendar-astro-date-string date))) | 207 | (calendar-astro-date-string date))) |
| 204 | 208 | ||