Fix compilation in apm.el
Use more simple logic for up project settings