Emacs Lisp defaults to Dynamic Linking , so when you write
(defun my-fun-1 (...)
...
(setq foo 1)
...)
and get your warning, the code is equivalent (defvar foo)before defun.
This means that the my-fun-1above shares the value foowith
(defun maybe-start-ww3 ()
(when (= 1 foo)
(launch-missiles)))
; ELisp . , (, date) , .
, , .
, defvar , - , - , .