emacs automatically run a command on startup/shutdown
I use [MobileOrg][1] to synchronize my `emacs` org-files with my mobile. For correct synchronization, mobile-org requires me to run `org-mobile-push` and `org-mobile-pull`.
I can automatically run `org-mobile-pull` on startup by inserting
(org-mobile-pull)
into my `.emacs` file, but how do I automatically run a command when **closing** emacs?
[1]: http://mobileorg.ncogni.to/