Browse Source

Add C-x C-k binding

master
10sr 5 years ago
parent
commit
14d5f0bbae
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      emacs.el

+ 5
- 1
emacs.el View File

@@ -1810,7 +1810,7 @@ found, otherwise returns nil."
(interactive) (interactive)
(if (y-or-n-p (concat "kill current buffer? :")) (if (y-or-n-p (concat "kill current buffer? :"))
(kill-buffer (current-buffer)))) (kill-buffer (current-buffer))))
(defun my-force-query-kill-current-buffer ()
(defun my-force-query-kill-current-buffer ()
"Interactively kill current buffer." "Interactively kill current buffer."
(interactive) (interactive)
(when (y-or-n-p (concat "kill current buffer? :")) (when (y-or-n-p (concat "kill current buffer? :"))
@@ -1818,6 +1818,10 @@ found, otherwise returns nil."
(kill-buffer-query-functions nil)) (kill-buffer-query-functions nil))
(kill-buffer (current-buffer))))) (kill-buffer (current-buffer)))))
;;(global-set-key "\C-xk" 'my-query-kill-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 (substitute-key-definition 'kill-buffer
'my-query-kill-current-buffer 'my-query-kill-current-buffer
global-map) global-map)


Loading…
Cancel
Save