summaryrefslogtreecommitdiff
path: root/lisp/calendar
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-06-15 14:22:38 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-06-15 14:22:45 +0200
commite64621427b42ca87f548da7cdb5191b6c69fadee (patch)
tree784a7bcfa90b82e30f22d055ca7d964348d0748a /lisp/calendar
parent4262e13a095ff6b1d9738bf3eef7098cefcf3958 (diff)
downloademacs-e64621427b42ca87f548da7cdb5191b6c69fadee.tar.gz
emacs-e64621427b42ca87f548da7cdb5191b6c69fadee.tar.bz2
emacs-e64621427b42ca87f548da7cdb5191b6c69fadee.zip
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.
Diffstat (limited to 'lisp/calendar')
-rw-r--r--lisp/calendar/cal-bahai.el5
-rw-r--r--lisp/calendar/cal-china.el8
-rw-r--r--lisp/calendar/cal-coptic.el8
-rw-r--r--lisp/calendar/cal-french.el8
-rw-r--r--lisp/calendar/cal-hebrew.el8
-rw-r--r--lisp/calendar/cal-islam.el8
-rw-r--r--lisp/calendar/cal-iso.el7
-rw-r--r--lisp/calendar/cal-julian.el8
-rw-r--r--lisp/calendar/cal-mayan.el8
-rw-r--r--lisp/calendar/cal-persia.el8
-rw-r--r--lisp/calendar/lunar.el9
11 files changed, 63 insertions, 22 deletions
diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 8aa1eed4a5d..5a8ee77b7f6 100644
--- a/lisp/calendar/cal-bahai.el
+++ b/lisp/calendar/cal-bahai.el
@@ -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."
diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el
index c006765a093..d2d086be97a 100644
--- a/lisp/calendar/cal-china.el
+++ b/lisp/calendar/cal-china.el
@@ -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."
diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el
index c05f6d329a1..8d223590875 100644
--- a/lisp/calendar/cal-coptic.el
+++ b/lisp/calendar/cal-coptic.el
@@ -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."
diff --git a/lisp/calendar/cal-french.el b/lisp/calendar/cal-french.el
index 2c60602b13b..0d4b2f2e390 100644
--- a/lisp/calendar/cal-french.el
+++ b/lisp/calendar/cal-french.el
@@ -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."
diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el
index 8268335fc6f..b6b626dc2f5 100644
--- a/lisp/calendar/cal-hebrew.el
+++ b/lisp/calendar/cal-hebrew.el
@@ -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."
diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el
index 008f183e5d0..81ac4d0332b 100644
--- a/lisp/calendar/cal-islam.el
+++ b/lisp/calendar/cal-islam.el
@@ -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."
diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el
index 3611091bede..884c15db6c7 100644
--- a/lisp/calendar/cal-iso.el
+++ b/lisp/calendar/cal-iso.el
@@ -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."
diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el
index 1f2dc09aca2..d912f8323c8 100644
--- a/lisp/calendar/cal-julian.el
+++ b/lisp/calendar/cal-julian.el
@@ -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."
diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el
index e1377347bb9..cda2c888f22 100644
--- a/lisp/calendar/cal-mayan.el
+++ b/lisp/calendar/cal-mayan.el
@@ -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."
diff --git a/lisp/calendar/cal-persia.el b/lisp/calendar/cal-persia.el
index 2cb6466335c..897208fd2b4 100644
--- a/lisp/calendar/cal-persia.el
+++ b/lisp/calendar/cal-persia.el
@@ -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."
diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el
index 7ddb93967fb..1cdcc97f36a 100644
--- a/lisp/calendar/lunar.el
+++ b/lisp/calendar/lunar.el
@@ -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)