> (defadvice TeX-region-create (around preview-counters) > "Write out counter information to region." > (let ((TeX-region-extra > (concat > (and (boundp 'begin) > ^^^^^^^^^^^^^ > preview-buffer-has-counters > (mapconcat > #'identity > (cons > "" > (preview-counter-find (symbol-value 'begin))) > ^^^^^^^^^^^^^^^^^^^ > "\\setcounter")) > TeX-region-extra))) > ad-do-it))
Duh! Thanks for the heads up! Indeed, `defadvice` hides the code from the byte-compiler which is why I didn't get a warning for the (boundp 'begin). And I clearly forgot my usual scan of `(set `. Stefan