Byte compilation of my mode:
(defun dict-setup-expansions ()
"Add `dict-mode' specific expansions."
(set (make-local-variable 'er/try-expand-list) (list #'dict-mark-article)))
gives warning:
Warning: assignment to free variable `er/try-expand-list'
This is normal situation because er/try-expand-list is defined in external library expand-region.
My mode register extension to expand-region library but it is ok to run my mode without expand-region mode.
I think that proper way to deal with warning is to add declaration:
(defvar er/try-expand-list)
defvar docs say:
The `defvar' form also declares the variable as "special",
so that it is always dynamically bound even if `lexical-binding' is t.
I use -*- lexical-binding: t -*-. Does that mean that without defvar variable er/try-expand-list be in lexical scope and I have real bug?