From 14d5f0bbaeb4d58a03c0725379e8a1fc24b39d1b Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Thu, 31 Oct 2019 19:26:36 +0900 Subject: [PATCH] Add C-x C-k binding --- emacs.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs.el b/emacs.el index 3050d60..419130a 100644 --- a/emacs.el +++ b/emacs.el @@ -1810,7 +1810,7 @@ found, otherwise returns nil." (interactive) (if (y-or-n-p (concat "kill current buffer? :")) (kill-buffer (current-buffer)))) -(defun my-force-query-kill-current-buffer () +(defun my-force-query-kill-current-buffer () "Interactively kill current buffer." (interactive) (when (y-or-n-p (concat "kill current buffer? :")) @@ -1818,6 +1818,10 @@ found, otherwise returns nil." (kill-buffer-query-functions nil)) (kill-buffer (current-buffer))))) ;;(global-set-key "\C-xk" 'my-query-kill-current-buffer) + +;; Originally C-x C-k -> kmacro-keymap +;; (global-set-key "\C-x\C-k" 'kmacro-keymap) +(global-set-key (kbd "C-x C-k") 'my-query-kill-current-buffer) (substitute-key-definition 'kill-buffer 'my-query-kill-current-buffer global-map)