Using a global .dir-locals.el file is a better alternative than reincluding the same emacs header in every file of the project.
with thanks to the PX4 project