| (setq pidfile "emacs-server.pid") | |
| (add-hook 'emacs-startup-hook | |
| (lambda () | |
| (with-temp-file pidfile | |
| (insert (number-to-string (emacs-pid)))))) | |
| (add-hook 'kill-emacs-hook | |
| (lambda () | |
| (when (file-exists-p pidfile) | |
| (delete-file pidfile)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment