(defun my-ag/font-lock-extend-region () (save-excursion (goto-char font-lock-beg) (forward-line 2) (setq font-lock-beg (point))))
Warning: reference to free variable 'font-lock-beg' Warning: assignment to free variable 'font-lock-beg'
font-lock-extend-region-functions is a variable defined in ‘font-lock.el’. Each function is called with no argument; it is expected to adjust the dynamically bound variables ‘font-lock-beg’ and ‘font-lock-end’; and return non-nil if it did make such an adjustment.
(defvar ...) make this variables globally visible and may hide bugs.
How should I mask "reference/assignment to free variable" warning during compilation if variable is dynamically bounded?