]> git.eshelyaron.com Git - emacs.git/commitdiff
Suppress warning about `entry' in calendar
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 15 Jun 2019 12:30:50 +0000 (14:30 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 15 Jun 2019 12:30:50 +0000 (14:30 +0200)
* 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
lisp/calendar/cal-hebrew.el

index d2d086be97a314539b0c2c481b91a8d8841ed7e4..7fbdb8fc1448df2e67b992f2681279ace4709e38 100644 (file)
@@ -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
   ["正月" "二月" "三月" "四月" "五月" "六月"
index b6b626dc2f5c6dc10010c6e658589742131ca253..a64af63111568fe1886d49bd8da5814d80f6a910 100644 (file)
@@ -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