Merge remote-tracking branch 'origin/master' into feature/android

This commit is contained in:
Po Lu 2023-06-28 08:29:27 +08:00
commit 8f87af4237
5 changed files with 47 additions and 26 deletions

View file

@ -3473,8 +3473,9 @@ lambda-expression."
run-hook-with-args-until-failure))
(pcase (cdr form)
(`(',var . ,_)
(when (memq var byte-compile-lexical-variables)
(byte-compile-report-error
(when (and (memq var byte-compile-lexical-variables)
(byte-compile-warning-enabled-p 'lexical var))
(byte-compile-warn
(format-message "%s cannot use lexical var `%s'" fn var))))))
;; Warn about using obsolete hooks.
(if (memq fn '(add-hook remove-hook))