1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-07 08:00:48 -08:00

Suppress warning about prefixless date variable in calendar

* lisp/calendar/lunar.el (date):
* lisp/calendar/cal-persia.el (date):
* lisp/calendar/cal-mayan.el (date):
* lisp/calendar/cal-julian.el (date):
* lisp/calendar/cal-iso.el (date):
* lisp/calendar/cal-islam.el (date):
* lisp/calendar/cal-hebrew.el (date):
* lisp/calendar/cal-french.el (date):
* lisp/calendar/cal-coptic.el (date):
* lisp/calendar/cal-china.el (date):
* lisp/calendar/cal-bahai.el (date): Suppress warning about this
prefix-less dynamic variable, because it's part of the documented
calling convention used in the sexp part of users' diary files.
This commit is contained in:
Lars Ingebrigtsen 2019-06-15 14:22:38 +02:00
parent 4262e13a09
commit e64621427b
11 changed files with 63 additions and 22 deletions

View file

@ -313,10 +313,13 @@ Prefix argument ARG will make the entry nonmarking."
diary-bahai-entry-symbol
'calendar-bahai-from-absolute))
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-bahai-date ()
"Baháí calendar equivalent of date diary entry."

View file

@ -632,9 +632,13 @@ Echo Chinese date unless NOECHO is non-nil."
(calendar-chinese-to-absolute date)))
(or noecho (calendar-chinese-print-date)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-chinese-date ()
"Chinese calendar equivalent of date diary entry."

View file

@ -168,9 +168,13 @@ Echo Coptic date unless NOECHO is t."
(or noecho (calendar-coptic-print-date)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-coptic-date ()
"Coptic calendar equivalent of date diary entry."

View file

@ -243,9 +243,13 @@ Echo French Revolutionary date unless NOECHO is non-nil."
(calendar-french-to-absolute date)))
(or noecho (calendar-french-print-date)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-french-date ()
"French calendar equivalent of date diary entry."

View file

@ -748,9 +748,13 @@ from the cursor position."
;; or the corresponding day in years without that date.
(+ (calendar-hebrew-to-absolute (list b-month 1 year)) b-day -1))))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-hebrew-date ()
"Hebrew calendar equivalent of date diary entry."

View file

@ -305,9 +305,13 @@ Prefix argument ARG makes the entry nonmarking."
diary-islamic-entry-symbol
'calendar-islamic-from-absolute))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-sexp-entry, where DATE, ENTRY are bound.
;;;###diary-autoload
(defun diary-islamic-date ()
"Islamic calendar equivalent of date diary entry."

View file

@ -129,9 +129,12 @@ Interactively, goes to the first day of the specified week."
(calendar-iso-to-absolute date)))
(or noecho (calendar-iso-print-date)))
(defvar date)
;; The function below is designed to be used from sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-iso-date ()
"ISO calendar equivalent of date diary entry."

View file

@ -183,9 +183,13 @@ Echo astronomical (Julian) day number unless NOECHO is non-nil."
(or noecho (calendar-astro-print-day-number)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-julian-date ()
"Julian calendar equivalent of date diary entry."

View file

@ -353,9 +353,13 @@ Echo Mayan date unless NOECHO is non-nil."
(calendar-mayan-long-count-to-absolute date)))
(or noecho (calendar-mayan-print-date)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-mayan-date ()
"Show the Mayan long count, haab, and tzolkin dates as a diary entry."

View file

@ -196,9 +196,13 @@ Echo Persian date unless NOECHO is non-nil."
(or noecho (calendar-persian-print-date)))
(defvar date)
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;; To be called from diary-list-sexp-entries, where DATE is bound.
;;;###diary-autoload
(defun diary-persian-date ()
"Persian calendar equivalent of date diary entry."

View file

@ -241,9 +241,12 @@ This function is suitable for execution in an init file."
(displayed-year (calendar-extract-year date)))
(calendar-lunar-phases))))
(defvar date)
;; To be called from diary-list-sexp-entries, where DATE is bound.
;; The function below is designed to be used in sexp diary entries,
;; and may be present in users' diary files, so suppress the warning
;; about this prefix-less dynamic variable. It's called from
;; `diary-list-sexp-entries', which binds the variable.
(with-suppressed-warnings ((lexical date))
(defvar date))
;;;###diary-autoload
(defun diary-lunar-phases (&optional mark)