瀏覽代碼

Add my-force-query-kill-current-buffer

master
10sr 5 年之前
父節點
當前提交
8ce816fbb1
簽署人: 10sr GPG Key ID: 7BEC428194130EB2
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      emacs.el

+ 7
- 0
emacs.el 查看文件

@@ -1810,6 +1810,13 @@ 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 ()
"Interactively kill current buffer."
(interactive)
(when (y-or-n-p (concat "kill current buffer? :"))
(let ((kill-buffer-hook nil)
(kill-buffer-query-functions nil))
(kill-buffer (current-buffer)))))
;;(global-set-key "\C-xk" 'my-query-kill-current-buffer)
(substitute-key-definition 'kill-buffer
'my-query-kill-current-buffer


Loading…
取消
儲存