How do I bind CMD+W to kill the current buffer in Emacs on OSX? C-x k RET is unnatural and a comparatively lengthy binding compared to CMD+W.
(defun kill-current-buffer ()
(global-set-key (kbd "s-w") 'kill-current-buffer)
(Credit goes to jlf at #emacs)
5 years ago