Severity: minor Tags: patch Given the following two files under /tmp: ;;; foo.el -*- lexical-binding: t -*- (defvar foo-x) (defvar foo-y) ;;; foo.el ends here ;;; bar.el -*- lexical-binding: t -*- (defun bar-x (foo-x) (ignore foo-x)) (let ((foo-y 1)) (ignore foo-y) (setq foo-y 2)) ;;; bar.el ends here $ EMACS_GENERATE_DYNVARS=1 emacs -Q -batch -f batch-byte-compile foo.el Generating /tmp/foo.elc.dynvars $ cat foo.elc.dynvars (# . "/tmp/foo.el") (# . "/tmp/foo.el") $ EMACS_DYNVARS_FILE=foo.elc.dynvars emacs -Q -batch -f batch-byte-compile bar.el Since the .dynvars file makes for some bad reading, the last step gives no diagnostic, though I would expect it to. Here's a patch that binds print-symbols-bare appropriately: