emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e646214: Suppress warning about prefixless date var


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master e646214: Suppress warning about prefixless date variable in calendar
Date: Sat, 15 Jun 2019 08:23:18 -0400 (EDT)

branch: master
commit e64621427b42ca87f548da7cdb5191b6c69fadee
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    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.
---
 lisp/calendar/cal-bahai.el  | 5 ++++-
 lisp/calendar/cal-china.el  | 8 ++++++--
 lisp/calendar/cal-coptic.el | 8 ++++++--
 lisp/calendar/cal-french.el | 8 ++++++--
 lisp/calendar/cal-hebrew.el | 8 ++++++--
 lisp/calendar/cal-islam.el  | 8 ++++++--
 lisp/calendar/cal-iso.el    | 7 +++++--
 lisp/calendar/cal-julian.el | 8 ++++++--
 lisp/calendar/cal-mayan.el  | 8 ++++++--
 lisp/calendar/cal-persia.el | 8 ++++++--
 lisp/calendar/lunar.el      | 9 ++++++---
 11 files changed, 63 insertions(+), 22 deletions(-)

diff --git a/lisp/calendar/cal-bahai.el b/lisp/calendar/cal-bahai.el
index 8aa1eed..5a8ee77 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 c006765..d2d086b 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 c05f6d3..8d22359 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 2c60602..0d4b2f2 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 8268335..b6b626d 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 008f183..81ac4d0 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 3611091..884c15d 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 1f2dc09..d912f83 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 e137734..cda2c88 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 2cb6466..897208f 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 7ddb939..1cdcc97 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]