Use disabled-command-function instead of mapatoms.