This has been bothering me for a long time. According to an old post, Ctrl-C can’t be properly mapped in the normal Cygwin console running under Windows; so Ctrl-X-Ctrl-C-ing out of Emacs under Cygwin is not an option.
Alternatives are as follows:
- Set the environmental variable
CYGWIN=tty
. (This may disable echo back to the local terminal when you exit Emacs.) - Run emacs under rxvt or X.
- Use
M-x kill-emacs
. (I wish I had know about this years ago.)
Die, emacs. Die.
But why would you want to leave emacs?
Clearly I need to spend more time with M-x doctor.
Hm, I just use Ctrl-Z to stop the process then kill -9 with the process ID to kill it.
If you are like me and need to use native cmd for some older windows programs, just assign kill-emacs to “C-x c” like so:
emacs ~/.emacs
Add this line:
(global-set-key (kbd “C-x c”) ‘kill-emacs)