emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 777f410: Suppress warning about `entry' in calendar


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 777f410: Suppress warning about `entry' in calendar
Date: Sat, 15 Jun 2019 08:30:56 -0400 (EDT)

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

    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 d2d086b..7fbdb8f 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 b6b626d..a64af63 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



reply via email to

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