From 777f410666c252751f1f2b79b0d4ae76c546c8b4 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Sat, 15 Jun 2019 14:30:50 +0200 Subject: [PATCH] Suppress warning about `entry' in calendar * lisp/calendar/cal-china.el (entry): * lisp/calendar/cal-hebrew.el (entry): Suppress warning about dynamically bound `entry', which has to be bound for diary-chinese-anniversary and diary-hebrew-birthday to work. These function can be used in the sexp part of users' diary files. --- lisp/calendar/cal-china.el | 5 ++++- lisp/calendar/cal-hebrew.el | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index d2d086be97a..7fbdb8fc144 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -654,7 +654,10 @@ Echo Chinese date unless NOECHO is non-nil." (autoload 'diary-make-date "diary-lib") (autoload 'diary-ordinal-suffix "diary-lib") (defvar diary-sexp-entry-symbol) -(defvar entry) ;used by `diary-chinese-anniversary' +;; `diary-chinese-anniversary' can be used in users' diary files, and +;; `entry' har to be dynamically bound when that is called. +(with-suppressed-warnings ((lexical entry)) + (defvar entry)) ;used by `diary-chinese-anniversary' (defvar calendar-chinese-month-name-array ["正月" "二月" "三月" "四月" "五月" "六月" diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index b6b626dc2f5..a64af631115 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -760,7 +760,10 @@ from the cursor position." "Hebrew calendar equivalent of date diary entry." (format "Hebrew date (until sunset): %s" (calendar-hebrew-date-string date))) -(defvar entry) +;; `diary-hebrew-birthday' can be used in users' diary files, and +;; `entry' has to be dynamically bound when that is used. +(with-suppressed-warnings ((lexical entry)) + (defvar entry)) (declare-function diary-ordinal-suffix "diary-lib" (n)) ;;;###diary-autoload -- 2.39.5