Fix returning callback return value.

Propagate the return value of callbacks correctly, so that if you
return “false”, the “default action” is not executed and the event
ceases to propagate.
Update .gitignore.

Ignore *.bak and *.swp.