From e64621427b42ca87f548da7cdb5191b6c69fadee Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 15 Jun 2019 14:22:38 +0200 Subject: 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-mayan.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lisp/calendar/cal-mayan.el') 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." -- cgit v1.2.1